cy
2023-12-08 3c4153a193a7322fd9b36d647f503a695e5ff3ff
admin-web/src/views/stock/procure/receiptDetails/index.vue
@@ -33,9 +33,8 @@
import SettingIplatform from '@/utils/settingIplatform';
import detail from '../purchaseOrder/detail';
import * as finsystenant from '@/api/baseSetting/finsystenant';
import { goodsModel } from '@/api/stock/procure/purchaseOrder';
import myImport from '@/views/components/myImport';
import { getBaseUrl } from '@/utils/base';
import {getBaseUrl} from '@/utils/base';
export default {
  name: 'index',
@@ -52,28 +51,41 @@
          defaultValue: '',
        },
        {
          type: 'text',
          dataIndex: 'goodsTemplateName',
          label: '物品名称',
          placeholder: '请输入',
          defaultValue: '',
        },
        {
          type: 'select',
          dataIndex: 'baseGoodsModelsId',
          label: '规格型号',
          placeholder: '请选择',
          defaultValue: '',
          options: [],
        },
        {
          type: 'cascader',
          dataIndex: 'agencyId',
          label: '机构',
          placeholder: '请选择',
          optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null },
          cascader: [{key:'goodsTemplateId',queryKey: 'agencyId'}],
          defaultValue: '',
          options: [],
        },
        {
          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: '请输入',
          defaultValue: '',
          options: [],
          optionsConfig: {
            label: 'modelName',
            value: 'id',
            url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel',
          },
        },
        {
          type: 'text',
@@ -147,9 +159,9 @@
        },
        // 列信息
        columns: [
          { title: '单号', field: 'businessFormCode', align: 'center' },
          { title: '物品名称', field: 'goodsTemplateName', align: 'center' },
          { title: '规格型号', field: 'baseGoodsModelsName', align: 'center' },
          { title: '单号', field: 'businessFormCode', align: 'center', width: 130 },
          { title: '物品名称', field: 'goodsTemplateName', align: 'left', minWidth: 140 },
          { title: '规格型号', field: 'baseGoodsModelsName', align: 'left', width: 130 },
          {
            title: '单价',
            field: 'price',
@@ -164,11 +176,11 @@
            field: 'amount',
            align: 'center',
            formatter: (row) => {
              return { value: row.price / 100 };
              return { value: row.amount / 100 };
            },
          },
          { title: '所属机构', field: 'agencyName', align: 'center' },
          { title: '创建人', field: 'buyerName', align: 'center' },
          { title: '所属机构', field: 'agencyName', align: 'center', width: 130 },
          { title: '创建人', field: 'buyerName', align: 'center', width: 90 },
          {
            title: '操作时间',
            field: 'procureTime',
@@ -182,7 +194,7 @@
        // 操作信息
        operation: {
          show: true, // 显示操作列
          width: '150', // 列宽
          width: 100, // 列宽
          attr: [
            {
              title: '详情',
@@ -206,17 +218,6 @@
    };
  },
  created() {
    // 搜索框规格型号
    goodsModel().then((res) => {
      this.items.forEach((v) => {
        if (v.label == '规格型号') {
          v.options = res.map((item) => {
            (item.label = item.modelName), (item.value = item.id);
            return item;
          });
        }
      });
    });
  },
  methods: {
    //导入
@@ -279,9 +280,6 @@
      }
      if (this.filterFrom.incomeTimeEnd) {
        this.filterFrom.incomeTimeEnd = this.filterFrom.incomeTimeEnd.replace(/\-/g, '');
      }
      if (params.agencyId && params.agencyId.length) {
        this.filterFrom.agencyId = params.agencyId[params.agencyId.length - 1];
      }
      this.search(1);
    },