wbc
13 小时以前 29d52b87325bc8406d6f6beb73939007e947e6fd
生产报工模糊查询装配条件
已修改2个文件
55 ■■■■ 文件已修改
H5/Js/Scbg.js 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Scbg.aspx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Scbg.js
@@ -1,4 +1,4 @@
var vm = new Vue({
var vm = new Vue({
    el: '#app',
    data: function () {
        return {
@@ -27,6 +27,7 @@
            active: 0,
            show: false,
            actions: [],
            filterCondition: "装配车间",
        }
    },
    mounted() {
@@ -62,8 +63,6 @@
    },
    methods: {
        getInfo() {
            this.show = true;
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'MesStaff/GetList', {
@@ -72,11 +71,28 @@
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.actions = json.data.tbBillList.map(item => {
                            return { name: item.staffName }
                        });
                        that.stafList = json.data.tbBillList;
                        let searchText = that.filterCondition ? String(that.filterCondition).trim().toLowerCase() : "";
                        let filteredList = that.stafList;
                        if (searchText) {
                            filteredList = that.stafList.filter(item => {
                                let sName = item.staffName ? String(item.staffName).toLowerCase() : "";
                                let sNo = item.staffNo ? String(item.staffNo).toLowerCase() : "";
                                return sName.includes(searchText) || sNo.includes(searchText);
                            });
                        }
                        if (filteredList.length === 0) {
                            that.$toast("未找到匹配的员工");
                            that.actions = [];
                        } else {
                            that.actions = filteredList.map(item => {
                                return { name: item.staffName, data: item }
                            });
                            that.show = true;
                        }
                    }
                    else {
                        that.$toast.fail(json.message);
@@ -99,14 +115,19 @@
            // 可以通过 close-on-click-action 属性开启自动收起
            this.show = false;
            let staf = this.stafList.filter(it => it.staffName === item.name);
            if (staf.length > 0) {
                this.stafName = staf[0].staffName;
                this.stafId = staf[0].staffNo;
            if (item.data) {
                this.stafName = item.data.staffName;
                this.stafId = item.data.staffNo;
                this.$refs.barcode.focus();
            } else {
                this.$toast("未找到匹配的 staffName");
                let staf = this.stafList.filter(it => it.staffName === item.name);
                if (staf.length > 0) {
                    this.stafName = staf[0].staffName;
                    this.stafId = staf[0].staffNo;
                    this.$refs.barcode.focus();
                } else {
                    this.$toast("未找到匹配的 staffName");
                }
            }
            //this.GetMesItemBlDetailByBillNo();
            //this.$toast(item.name);
H5/Scbg.aspx
@@ -18,6 +18,14 @@
        <van-cell-group>
  <van-field
    value=""
    label="查询条件"
    clearable
     placeholder="请输入查询条件"
    :right-icon-size="19"
      v-model="filterCondition"
  ></van-field>
  <van-field
    value=""
    label="员工编号"
    clearable 
     placeholder="选择"