haoyahui
2023-11-22 9834dbff448908d2008d8c52a2544aad00c099b1
admin-web/src/views/stock/transfer/transferdetails/index.vue
@@ -52,19 +52,31 @@
          defaultValue: '',
        },
        {
          type: 'text',
          dataIndex: 'goodsName',
          type: 'select',
          dataIndex: 'goodsTemplateId',
          label: '物品名称',
          placeholder: '请输入',
          defaultValue: '',
          options: [],
          cascader: [{ key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId' }],
          optionsConfig: {
            label: 'goodsName',
            value: 'id',
            url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate',
          },
        },
        {
          type: 'select',
          dataIndex: 'baseGoodsModelsId',
          label: '规格型号',
          placeholder: '请选择',
          placeholder: '请输入',
          defaultValue: '',
          options: [],
          optionsConfig: {
            label: 'modelName',
            value: 'id',
            url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel',
          },
        },
        {
          type: 'cascader',
@@ -218,22 +230,8 @@
    };
  },
  created() {
    this.initSearch();
  },
  methods: {
    initSearch() {
      this.items.map(async (item) => {
        if (item.label == '规格型号') {
          let res = await goodsModel();
          item.options = res.map((v) => {
            v.label = v.modelName;
            v.value = v.id;
            return v;
          });
        }
        return item;
      });
    },
    showDetail(row) {
      this.detailSetting.id = row.id;
      this.detailSetting.info = JSON.stringify(row);
@@ -250,12 +248,6 @@
    },
    fifterForm(params) {
      this.filterFrom = Object.assign(this.filterFrom, params);
      if (this.filterFrom.outAgencyId && this.filterFrom.outAgencyId.length) {
        this.filterFrom.outAgencyId = this.filterFrom.outAgencyId[this.filterFrom.outAgencyId.length - 1];
      }
      if (this.filterFrom.inAgencyId && this.filterFrom.inAgencyId.length) {
        this.filterFrom.inAgencyId = this.filterFrom.inAgencyId[this.filterFrom.inAgencyId.length - 1];
      }
      if (this.filterFrom.createTimeStart) {
        this.filterFrom.createTimeStart = this.filterFrom.createTimeStart.replace(/\-/g, '');
      }