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,32 +51,45 @@
          defaultValue: '',
        },
        {
          type: 'text',
          dataIndex: 'goodsTemplateName',
          label: '物品名称',
          placeholder: '请输入',
          defaultValue: '',
        },
        {
          type: 'select',
          dataIndex: 'baseGoodsTemplateId',
          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',
          dataIndex: 'buyerName',
          dataIndex: 'createName',
          label: '创建人',
          placeholder: '请输入',
          defaultValue: '',
@@ -100,7 +112,7 @@
      // 搜索条件
      filterFrom: {
        tenantId: null,
        agencyId:[],
        agencyId: [],
        status: 1,
      },
      // 导入
@@ -147,14 +159,28 @@
        },
        // 列信息
        columns: [
          { title: '单号', field: 'businessFormCode', align: 'center' },
          { title: '物品名称', field: 'goodsTemplateName', align: 'center' },
          { title: '规格型号', field: 'baseGoodsModelsName', align: 'center' },
          { title: '单价', field: 'price', 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',
            align: 'center',
            formatter: (row) => {
              return { value: row.price / 100 };
            },
          },
          { title: '入库数量', field: 'counts', align: 'center' },
          { title: '金额', field: 'amount', align: 'center' },
          { title: '所属机构', field: 'agencyName', align: 'center' },
          { title: '创建人', field: 'buyerName', align: 'center' },
          {
            title: '金额',
            field: 'amount',
            align: 'center',
            formatter: (row) => {
              return { value: row.amount / 100 };
            },
          },
          { title: '所属机构', field: 'agencyName', align: 'center', width: 130 },
          { title: '创建人', field: 'buyerName', align: 'center', width: 90 },
          {
            title: '操作时间',
            field: 'procureTime',
@@ -168,7 +194,7 @@
        // 操作信息
        operation: {
          show: true, // 显示操作列
          width: '150', // 列宽
          width: 100, // 列宽
          attr: [
            {
              title: '详情',
@@ -192,18 +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: {
    //导入
@@ -247,9 +261,9 @@
        .catch(() => {});
    },
    showDetail(row) {
      this.detailSetting.id=row.businessId
      this.detailSetting.title='详情'
      this.detailSetting.show=true
      this.detailSetting.id = row.businessId;
      this.detailSetting.title = '详情';
      this.detailSetting.show = true;
    },
    // 查询table列表
    search(pageNum) {
@@ -266,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);
    },