Z 1 год назад
Родитель
Сommit
4eec926c1d
22 измененных файлов с 1003 добавлено и 58 удалено
  1. 285 0
      src/BIZComponents/procedure/taskinstanceDialog.vue
  2. 30 1
      src/api/aps/index.js
  3. 1 1
      src/views/contractManage/contractBook/components/inventoryTabledetail.vue
  4. 15 1
      src/views/purchasingManage/inquiryManage/components/inquiryTable.vue
  5. 14 0
      src/views/purchasingManage/inquiryManage/components/inventoryTable.vue
  6. 15 1
      src/views/purchasingManage/purchaseNeedManage/components/detailDialog.vue
  7. 58 12
      src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue
  8. 141 26
      src/views/purchasingManage/purchaseOrder/components/billDetailDialog.vue
  9. 83 3
      src/views/purchasingManage/purchaseOrder/components/detailDialog.vue
  10. 59 5
      src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue
  11. 14 0
      src/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue
  12. 14 0
      src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue
  13. 14 0
      src/views/purchasingManage/purchaseOrder/outSourceSend/components/detailDialog.vue
  14. 14 0
      src/views/purchasingManage/purchaseOrder/outSourceSend/components/inventoryTable.vue
  15. 14 0
      src/views/purchasingManage/purchaseOrder/returnGoods/components/detailDialog.vue
  16. 14 0
      src/views/purchasingManage/purchaseOrder/returnGoods/components/inventoryTable.vue
  17. 17 2
      src/views/purchasingManage/purchasePlanManage/components/detailDialog.vue
  18. 59 2
      src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue
  19. 0 1
      src/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue
  20. 2 2
      src/views/saleManage/saleOrder/invoiceConfirm/components/detailDialog.vue
  21. 139 0
      src/views/saleManage/saleOrder/invoiceConfirm/components/searchTable.vue
  22. 1 1
      src/views/saleManage/saleOrder/invoiceConfirm/index.vue

+ 285 - 0
src/BIZComponents/procedure/taskinstanceDialog.vue

@@ -0,0 +1,285 @@
+<!-- 用户编辑弹窗 -->
+<template>
+  <ele-modal
+    width="1060px"
+    :visible="visible"
+    :append-to-body="true"
+    :close-on-click-modal="false"
+    custom-class="ele-dialog-form"
+    title="工序"
+    @update:visible="updateVisible(false)"
+  >
+    <header-title title="基本信息"> </header-title>
+    <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="加工方式:" prop="produceType">
+            <el-select
+              v-model="form.produceType"
+              style="width: 100%"
+              @change="changeProduceType"
+            >
+              <el-option
+                v-for="item of producedList"
+                :key="item.code"
+                :label="item.name"
+                :value="item.code"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="BOM版本:" prop="bomCategoryId">
+            <el-select
+              v-model="form.bomCategoryId"
+              style="width: 100%"
+              @change="changeBomId"
+            >
+              <el-option
+                v-for="item of bomVersionList"
+                :key="item.id"
+                :label="item.name + '(V' + item.versions + '.0)'"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="工艺路线:" prop="produceRoutingId">
+            <!--  @click.native="openVersion"   -->
+            <el-select
+              v-model="form.produceRoutingId"
+              style="width: 100%"
+              @change="changeRoute"
+            >
+              <el-option
+                v-for="item of routingList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <ele-pro-table
+      ref="table"
+      :needPage="false"
+      :columns="columns"
+      :datasource="datasource"
+      @cell-click="cellClick"
+      row-key="id"
+    >
+      <template v-slot:orderNum="{ row }">
+        {{ row.orderNum }}
+      </template>
+      <template v-slot:action="{ row }">
+        <el-radio class="radio" v-model="radio" :label="row.id"
+          ><i></i
+        ></el-radio>
+      </template>
+    </ele-pro-table>
+
+    <template v-slot:footer>
+      <el-button type="primary" @click="save"> 确定 </el-button>
+      <el-button @click="updateVisible(false)"> 返回 </el-button>
+    </template>
+  </ele-modal>
+</template>
+
+<script>
+  import { bomListByPlan, bomRoutingList, taskinstanceList } from '@/api/aps';
+
+  export default {
+    components: {},
+    props: {
+      // 弹窗是否打开
+      visible: Boolean
+    },
+    data() {
+      const defaultForm = {
+        produceType: '',
+        bomCategoryId: '',
+        produceRoutingId: ''
+      };
+      return {
+        defaultForm,
+        radio: null,
+        current: {},
+        producedList: [
+          { code: 2, name: '加工(MBOM)' },
+          { code: 3, name: '装配(ABOM)' }
+        ],
+        index: '',
+        bomVersionList: [],
+        routingList: [],
+        // 表单数据
+        form: { ...defaultForm },
+        // 表单验证规则
+        rules: {},
+        versionList: [],
+        // 提交状态
+        loading: false,
+        // 是否是修改
+        isUpdate: false,
+
+        columns: [
+          {
+            action: 'action',
+            slot: 'action',
+            align: 'center',
+            label: '选择',
+            width: 80
+          },
+          {
+            prop: 'orderNum',
+            label: '排序',
+            align: 'center',
+            slot: 'orderNum',
+            width: 80
+          },
+          {
+            prop: 'code',
+            label: '工序编码',
+            // sortable: 'custom',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+
+          {
+            prop: 'name',
+            label: '工序名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            align: 'center',
+            prop: 'controlName',
+            label: '工序控制码',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'workCenterName',
+            label: '所属工作中心',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          }
+        ]
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    methods: {
+      open(row, index) {
+        this.data = row;
+        this.index = index;
+      },
+      changeProduceType() {
+        this.form.bomCategoryId = '';
+        this.form['bomCategoryName'] = '';
+        this.form['bomCategoryVersions'] = '';
+
+        this.bomVersionList = [];
+        this.routingList = [];
+        this.form.produceRoutingId = '';
+        this.form.produceRoutingName = '';
+        this.form.produceVersionName = '';
+        this.bomListVersion();
+      },
+      bomListVersion() {
+        let param = {
+          bomType: this.form.produceType,
+          categoryId: this.data.productId
+        };
+        bomListByPlan(param).then((res) => {
+          this.bomVersionList = res || [];
+        });
+      },
+      changeBomId() {
+        this.routingList = [];
+        this.form.produceRoutingId = '';
+        this.form.produceRoutingName = '';
+        this.form.produceVersionName = '';
+        this.bomVersionList.forEach((f) => {
+          if (f.id == this.form.bomCategoryId) {
+            this.$set(this.form, 'bomCategoryName', f.name);
+            this.$set(this.form, 'bomCategoryVersions', f.versions);
+          }
+        });
+        this.getPlanRouting();
+      },
+      getPlanRouting() {
+        bomRoutingList(this.form.bomCategoryId).then((res) => {
+          this.routingList = res || [];
+        });
+      },
+      changeRoute(val) {
+        if (!val) return;
+        this.routingList.forEach((f) => {
+          if (f.id == this.form.produceRoutingId) {
+            this.$set(this.form, 'produceRoutingName', f.name);
+            this.$set(this.form, 'produceVersionName', f.version);
+          }
+        });
+        this.$refs.table.reload();
+      },
+      /* 表格数据源 */
+      async datasource() {
+        if (this.form.produceRoutingId) {
+          const res = await taskinstanceList({
+            routingId: this.form.produceRoutingId,
+            isDetail: true,
+            pageNum: 1,
+            size: -1
+          });
+
+          let arr = res.list.map((it) => {
+            it.detail.orderNum = it.orderNum;
+            return it.detail;
+          });
+          return {
+            list: arr
+          };
+        } else {
+          return {
+            list: []
+          };
+        }
+
+        //this.$refs.table.reload()
+      },
+      // 单击获取id
+      cellClick(row) {
+        this.current = row;
+        this.radio = row.id;
+      },
+      /* 保存编辑 */
+      save() {
+        if (!this.radio) return this.$message.warning('请选择工序');
+        this.$emit('saveTaskInstance', {
+          ...this.current,
+          index: this.index,
+          produceRoutingId: this.form.produceRoutingId
+        });
+        this.updateVisible(false);
+      },
+
+      /* 更新visible */
+      updateVisible(value) {
+        this.$emit('update:visible', value);
+      }
+    },
+
+    watch: {}
+  };
+</script>

+ 30 - 1
src/api/aps/index.js

@@ -9,4 +9,33 @@ import request from '@/utils/request';
       return res.data.data;
     }
     return Promise.reject(new Error(res.data.message));
-  }
+  }
+// aps生产计划获取产品的多个bom版本
+export async function bomListByPlan(params) {
+  const res = await request.get(
+    `/main/bomCategory/bomListByPlan`, { params }
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 根据bom 获取工艺路线
+
+export async function bomRoutingList(id) {
+  const res = await request.get(`/main/bomCategory/bomRoutingList/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//工艺路线工序实例-分页
+export async function taskinstanceList (data) {
+  const res = await request.post(
+    '/main/producerouting/taskinstance/page',
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+}

+ 1 - 1
src/views/contractManage/contractBook/components/inventoryTabledetail.vue

@@ -187,7 +187,7 @@
           {
             minWidth: 80,
             prop: 'waitTotalCount',
-            label: '采数量',
+            label: '采数量',
             align: "center"
           },
           {

+ 15 - 1
src/views/purchasingManage/inquiryManage/components/inquiryTable.vue

@@ -480,7 +480,7 @@ const defaultColumns = [
   {
     minWidth: 80,
     prop: 'waitTotalCount',
-    label: '采数量',
+    label: '采数量',
     align: "center"
   },
   {
@@ -508,6 +508,20 @@ const defaultColumns = [
     showOverflowTooltip: true,
     align: "center"
   },
+  {
+    minWidth: 150,
+    prop: 'taskName',
+    label: '工序',
+    slot: 'taskName',
+    align: "center"
+  },
+  {
+    width: 110,
+    prop: 'batchNo',
+    label: '批次号',
+    slot: 'batchNo',
+    align: "center",
+  },
   {
     minWidth: 120,
     prop: 'modelType',

+ 14 - 0
src/views/purchasingManage/inquiryManage/components/inventoryTable.vue

@@ -361,6 +361,20 @@ export default {
           slot: 'availableCountBase',
           align: "center"
         },
+        {
+          minWidth: 150,
+          prop: 'taskName',
+          label: '工序',
+          slot: 'taskName',
+          align: "center"
+        },
+        {
+          width: 110,
+          prop: 'batchNo',
+          label: '批次号',
+          slot: 'batchNo',
+          align: "center",
+        },
         {
           minWidth: 80,
           prop: 'measuringUnit',

+ 15 - 1
src/views/purchasingManage/purchaseNeedManage/components/detailDialog.vue

@@ -270,9 +270,23 @@ export default {
         {
           width: 80,
           prop: 'waitTotalCount',
-          label: '采数量',
+          label: '采数量',
           align: "center"
         },
+        {
+          minWidth: 120,
+          prop: 'taskName',
+          label: '工序',
+          slot: 'taskName',
+          align: "center"
+        },
+        {
+          width: 110,
+          prop: 'batchNo',
+          label: '批次号',
+          slot: 'batchNo',
+          align: "center",
+        },
         {
           width: 100,
           prop: 'measuringUnit',

+ 58 - 12
src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue

@@ -14,14 +14,12 @@
       <template v-slot:toolbar>
         <div class="headbox">
           <div>
-
             <el-button
               size="small"
               type="primary"
               icon="el-icon-plus"
               class="ele-btn-icon"
-              @click="handParent('',-1)"
-            >
+              @click="handParent('',-1)">
               新增
             </el-button>
             <el-button
@@ -29,8 +27,7 @@
               type="primary"
               icon="el-icon-plus"
               class="ele-btn-icon"
-              @click="handlAdd"
-            >
+              @click="handlAdd">
               新增临时产品
             </el-button>
           </div>
@@ -45,8 +42,7 @@
             required: true,
             message: '请输入',
             trigger: 'change'
-          }"
-        >
+          }">
           <el-input
             v-model="row.productName"
             placeholder="请输入"
@@ -70,6 +66,27 @@
           <el-input v-model="scope.row.productCode" disabled></el-input>
         </el-form-item>
       </template>
+      <template v-slot:taskName="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.taskName'"
+        >
+          <el-input
+            v-model="scope.row.taskName"
+            placeholder="请选择"
+            style="width: 60%; margin-right: 10px"
+            disabled
+          ></el-input>
+          <el-button
+            v-if="scope.row.productCode"
+            size="small"
+            type="primary"
+            @click.native="handleTaskinstance(scope.row, scope.$index)"
+          >选择
+          </el-button
+          >
+        </el-form-item>
+      </template>
       <template v-slot:productCategoryName="scope">
         <el-form-item
           style="margin-bottom: 20px"
@@ -327,6 +344,7 @@
     ></product-list>
     <head-list ref="headRef" @changeParent="changeAnswer"></head-list>
     <timeDialog @chooseTime="chooseTime" ref="timeDialogRef"></timeDialog>
+    <taskinstance-dialog ref="taskinstanceDialogRef" v-if="taskinstanceDialogFlag" @saveTaskInstance="saveTaskInstance" :visible.sync="taskinstanceDialogFlag"></taskinstance-dialog>
   </el-form>
 </template>
 <script>
@@ -341,7 +359,7 @@ import {copyObj} from '@/utils/util';
 import {getInventoryTotalAPI} from "@/api/wms";
 import {getByCode} from "@/api/system/dictionary-data";
 import fileMain from "@/components/addDoc/index.vue";
-
+import taskinstanceDialog from '@/BIZComponents/procedure/taskinstanceDialog.vue'
 export default {
   mixins: [dictMixins],
   components: {
@@ -350,7 +368,8 @@ export default {
     cBomList,
     fileUpload,
     headList,
-    timeDialog
+    timeDialog,
+    taskinstanceDialog
   },
   data() {
     const defaultForm = {
@@ -371,6 +390,7 @@ export default {
       },
       rules: {},
       dictList: {},
+      taskinstanceDialogFlag:false,
       columns: [
         {
           width: 45,
@@ -379,7 +399,7 @@ export default {
           align: 'center'
         },
         {
-          width: 150,
+          width: 120,
           prop: 'productCategoryName',
           label: '分类',
           slot: 'productCategoryName',
@@ -393,7 +413,7 @@ export default {
           align: "center"
         },
         {
-          width: 240,
+          minWidth: 240,
           prop: 'productName',
           label: '名称',
           slot: 'productName',
@@ -431,6 +451,20 @@ export default {
           headerSlot: 'headerExpectReceiveDate',
           align: "center"
         },
+        {
+          minWidth: 240,
+          prop: 'taskName',
+          label: '工序',
+          slot: 'taskName',
+          align: "center"
+        },
+        {
+          width: 110,
+          prop: 'batchNo',
+          label: '批次号',
+          slot: 'batchNo',
+          align: "center",
+        },
         {
           width: 150,
           prop: 'productBrand',
@@ -680,6 +714,18 @@ export default {
         }
       })
     },
+    handleTaskinstance(row,index){
+      this.taskinstanceDialogFlag = true;
+      this.$nextTick(()=>{
+        this.$refs.taskinstanceDialogRef.open(row,index)
+      })
+
+    },
+    saveTaskInstance(row={}){
+      this.$set(this.form.datasource[row.index], 'taskId', row.id);
+      this.$set(this.form.datasource[row.index], 'taskName', row.name);
+      this.$set(this.form.datasource[row.index], 'routingId', row.produceRoutingId);
+    },
     remove(i) {
       this.form.datasource.splice(i, 1);
       this.setSort();
@@ -710,7 +756,7 @@ export default {
             this.$message.warning(messages[0].message);
 
           }
-        
+
           }
         callback(valid);
       });

+ 141 - 26
src/views/purchasingManage/purchaseOrder/components/billDetailDialog.vue

@@ -15,8 +15,9 @@
       :columns="columns"
       :toolkit="[]"
       max-height="500px"
-      :datasource="form.datasource"
-      cache-key="systemRoleTable17"
+      :datasource="datasource"
+      :span-method="objectSpanMethod"
+      cache-key="systemRoleTableBillDetailDialog"
       class="time-form"
       :need-page="false"
     >
@@ -29,8 +30,6 @@
 </template>
 
 
-
-
 <script>
 
 
@@ -48,13 +47,22 @@ export default {
   },
   data() {
     return {
-      arrName:{
-        1:'requirementIds',
-        2:'planIds',
-        3:'inquiryIds',
-        4:'contractIds'
+      arrName: {
+        1: 'requirementIds',
+        2: 'planIds',
+        3: 'inquiryIds',
+        4: 'contractIds',
+        // 5: 'contractIds',
+        // 6: 'contractIds',
       },
-      columns:[
+      spanArr: [],
+      type: '',
+      datasource: []
+    };
+  },
+  computed: {
+    columns() {
+      return [
         {
           width: 45,
           type: 'index',
@@ -65,56 +73,163 @@ export default {
 
         {
           minWidth: 120,
+          prop: 'relationType',
+          label: '单据类型',
+          align: "center"
+        },
+        {
+          minWidth: 100,
+          prop: 'sourceCode',
+          label: '单据编码',
+          align: "center"
+        },
+        {
+          minWidth: 100,
+          prop: 'sourceName',
+          label: '单据名称',
+          show: this.type != 5,
+          align: "center"
+        },
+        {
+          minWidth: 100,
           prop: 'productCode',
           label: '编码',
           align: "center"
         },
         {
-          minWidth: 200,
+          minWidth: 100,
           prop: 'productName',
           label: '名称',
           align: "center",
         },
         {
           minWidth: 100,
+          prop: 'supplierName',
+          show: this.type == 3,
+          label: '供应商名称',
+          align: "center",
+        },
+        {
+          minWidth: 100,
+          prop: 'supplierCode',
+          show: this.type == 3,
+          label: '供应商编码',
+          align: "center",
+        },
+
+        // {
+        //   width: 80,
+        //   prop: 'doneTotalCount',
+        //   label: '已采数量',
+        //   slot: 'doneTotalCount',
+        //   headerSlot: 'doneTotalCount',
+        //   align: "center"
+        //
+        // },
+        // {
+        //   width: 80,
+        //   prop: 'waitTotalCount',
+        //   label: '待采数量',
+        //   slot: 'waitTotalCount',
+        //   headerSlot: 'waitTotalCount',
+        //   align: "center"
+        // },
+        {
+          minWidth: 80,
           prop: 'totalCount',
           label: '数量',
           align: "center",
         },
         {
-          minWidth: 120,
+          minWidth: 100,
           prop: 'weightUnit',
           label: '重量单位',
           align: "center",
         },
         {
-          minWidth: 120,
+          minWidth: 100,
           prop: 'measuringUnit',
           label: '计量单位',
           align: "center",
         },
-      ],
-      form:{}
-    };
+        {
+          minWidth: 140,
+          prop: 'deliveryDeadline',
+          label: this.type == 4 ? '客户期望交期' : '预计到货时间',
+          align: "center",
+        },
+      ]
+    },
   },
   methods: {
-    async open(row,type) {
-      await this.getInquiryData(row,type);
-
+    async open(row, type) {
+      this.type = type
+      await this.getInquiryData(row, type);
+      this.getSpanArr()
     },
-    async getInquiryData(row,type = 1) {
+    async getInquiryData(row, type = 1) {
       let arrName = this.arrName[type]
       let params = {
-        productCode:row.productCode,
-        relationType:type,
-        relationIds: row[arrName] || []
+        productCode: row.productCode,
+        relationType: type,
+        relationIds: this.type != 5 ? (row[arrName] || []) : ([...row.requirementIds, ...row.planIds, ...row.inquiryIds, ...row.contractIds] || [])
       }
       this.loading = true;
-      const data = await getProductsNumberDetail(params);
+      try {
+        this.datasource = await getProductsNumberDetail(params);
+      } catch {
+        this.datasource = [];
+      }
       this.loading = false;
-      if (data) {
-        this.form = data;
+
+    },
+    objectSpanMethod({row, column, rowIndex, columnIndex}) {
+      if (this.columns[columnIndex]?.isMerge) {
+        const _row = this.spanArr[rowIndex]?.sourceCode || 0;
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
+      return {
+        rowspan: 1,
+        colspan: 1
+      };
+    },
+    getSpanArr() {
+      let pos = 0;
+      this.spanArr = [];
+      this.datasource.forEach((item, index) => {
+        if (index === 0) {
+          let obj = {}
+          this.columns.forEach(col => {
+            if (col.isMerge) {
+              obj[col.prop] = 1
+            }
+          });
+          this.spanArr.push(obj);
+        } else {
+          let nameSame = item.sourceCode === this.datasource[index - 1].sourceCode;
+          if (nameSame) {
+            this.spanArr[pos].sourceCode += 1;
+            this.spanArr.push({
+              relationType: 0,
+              sourceCode: 0,
+              sourceName: 0,
+            });
+          } else {
+            pos = index;
+            let obj = {}
+            this.columns.forEach(col => {
+              if (col.isMerge) {
+                obj[col.prop] = 1
+              }
+            });
+            this.spanArr.push(obj);
+          }
+        }
+      });
     },
     cancel() {
       this.$emit("update:billDetailDialogFlag", false);

+ 83 - 3
src/views/purchasingManage/purchaseOrder/components/detailDialog.vue

@@ -316,6 +316,25 @@
 <!--              {{ link.name }}</el-link-->
 <!--            >-->
 <!--          </div>-->
+
+        </template>
+        <template v-slot:requirementTotalCount="{ row, $index }">
+          <el-button type="text" @click="handleGetBillDetail(row,1)">{{row.requirementTotalCount}}</el-button>
+        </template>
+        <template v-slot:planTotalCount="{ row, $index }">
+          <el-button type="text" @click="handleGetBillDetail(row,2)">{{row.planTotalCount}}</el-button>
+        </template>
+        <template v-slot:inquiryTotalCount="{ row, $index }">
+          <el-button type="text" @click="handleGetBillDetail(row,3)">{{row.inquiryTotalCount}}</el-button>
+        </template>
+        <template v-slot:contractTotalCount="{ row, $index }">
+          <el-button type="text" @click="handleGetBillDetail(row,4)">{{row.contractTotalCount}}</el-button>
+        </template>
+        <template v-slot:doneTotalCount="{ row, $index }">
+          <el-button type="text" @click="handleGetBillDetail(row,5)">{{row.doneTotalCount}}</el-button>
+        </template>
+        <template v-slot:waitTotalCount="{ row, $index }">
+          <el-button type="text" @click="handleGetBillDetail(row,6)">{{row.waitTotalCount}}</el-button>
         </template>
       </ele-pro-table>
     </div>
@@ -335,6 +354,7 @@
     <div slot="footer" class="footer">
       <el-button @click="cancel">返回</el-button>
     </div>
+    <bill-detail-dialog :bill-detail-dialog-flag.sync="billDetailDialogFlag" v-if="billDetailDialogFlag" ref="billDetailDialogRef"></bill-detail-dialog>
   </ele-modal>
 </template>
 
@@ -351,10 +371,12 @@
   import { copyObj } from '@/utils/util';
   import bpmDetail from '@/views/bpm/processInstance/detail.vue';
   import fileMain from "@/components/addDoc/index.vue";
+  import billDetailDialog from "@/views/purchasingManage/purchaseOrder/components/billDetailDialog.vue";
 
   export default {
     mixins: [dictMixins],
     components: {
+      billDetailDialog,
       fileMain,
       invoiceList,
       returnGoodsList,
@@ -364,6 +386,7 @@
     data() {
       return {
         activeComp: 'order',
+        billDetailDialogFlag: false,
         tabOptions: [
           { key: 'order', name: '订单详情' },
           { key: 'bpm', name: '流程详情' },
@@ -487,7 +510,53 @@
             slot: 'specification',
             align: "center"
           },
+          {
+            width: 120,
+            prop: 'requirementTotalCount',
+            label: '采购需求数量',
+            slot: 'requirementTotalCount',
+            align: "center"
+
+          },
+          {
+            width: 120,
+            prop: 'planTotalCount',
+            label: '采购计划数量',
+            slot: 'planTotalCount',
+            align: "center"
+
+          },
+          {
+            width: 120,
+            prop: 'inquiryTotalCount',
+            label: '采购核价数量',
+            slot: 'inquiryTotalCount',
+            align: "center"
+
+          },
+          {
+            width: 120,
+            prop: 'contractTotalCount',
+            label: '采购合同数量',
+            slot: 'contractTotalCount',
+            align: "center"
+          },
+          {
+            width: 80,
+            prop: 'doneTotalCount',
+            label: '已采数量',
+            slot: 'doneTotalCount',
+            align: "center"
 
+          },
+          {
+            width: 80,
+            prop: 'waitTotalCount',
+            label: '待采数量',
+            // slot: 'waitTotalCount',
+            align: "center"
+
+          },
           {
             width: 120,
             prop: 'totalCount',
@@ -557,7 +626,13 @@
             },
             align: "center"
           },
-
+          {
+            width: 110,
+            prop: 'batchNo',
+            label: '批次号',
+            slot: 'batchNo',
+            align: "center",
+          },
           {
             width: 120,
             prop: 'deliveryDays',
@@ -626,10 +701,15 @@
       async open(row) {
         this.form = row;
         this.visible = true;
-        this.getDetailData(row.id);
+        await this.getDetailData(row.id);
         this.detailId = row.id;
       },
-
+      handleGetBillDetail(row,type){
+        this.billDetailDialogFlag = true
+        this.$nextTick(()=>{
+          this.$refs.billDetailDialogRef.open(row,type)
+        })
+      },
       cancel() {
         this.$nextTick(() => {
           // 关闭后,销毁所有的表单数据

+ 59 - 5
src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue

@@ -51,6 +51,33 @@
         <template v-slot:contractTotalCount="{ row, $index }">
           <el-button type="text" @click="handleGetBillDetail(row,4)">{{row.contractTotalCount}}</el-button>
         </template>
+        <template v-slot:doneTotalCount="{ row, $index }">
+          <el-button type="text" @click="handleGetBillDetail(row,5)">{{row.doneTotalCount}}</el-button>
+        </template>
+        <template v-slot:waitTotalCount="{ row, $index }">
+          <el-button type="text" @click="handleGetBillDetail(row,6)">{{row.waitTotalCount}}</el-button>
+        </template>
+        <template v-slot:taskName="scope">
+          <el-form-item
+            style="margin-bottom: 20px"
+            :prop="'datasource.' + scope.$index + '.taskName'"
+          >
+            <el-input
+              v-model="scope.row.taskName"
+              placeholder="请选择"
+              style="width: 60%; margin-right: 10px"
+              disabled
+            ></el-input>
+            <el-button
+              v-if="scope.row.productCode"
+              size="small"
+              type="primary"
+              @click.native="handleTaskinstance(scope.row, scope.$index)"
+            >选择
+            </el-button
+            >
+          </el-form-item>
+        </template>
         <template v-slot:productName="{ row, $index }">
           <el-form-item
             style="margin-bottom: 20px"
@@ -409,6 +436,8 @@
     ></product-list>
     <head-list ref="headRef" @changeParent="changeAnswer"></head-list>
     <bill-detail-dialog :bill-detail-dialog-flag.sync="billDetailDialogFlag" v-if="billDetailDialogFlag" ref="billDetailDialogRef"></bill-detail-dialog>
+    <taskinstance-dialog ref="taskinstanceDialogRef" v-if="taskinstanceDialogFlag" @saveTaskInstance="saveTaskInstance" :visible.sync="taskinstanceDialogFlag"></taskinstance-dialog>
+
   </el-form>
 </template>
 <script>
@@ -422,6 +451,7 @@ import {getFile} from "@/api/system/file";
 import {getByCode} from "@/api/system/dictionary-data";
 import fileMain from "@/components/addDoc/index.vue";
 import billDetailDialog from './billDetailDialog.vue'
+import taskinstanceDialog from "@/BIZComponents/procedure/taskinstanceDialog.vue";
 const dayjs = require('dayjs');
 
 export default {
@@ -441,6 +471,7 @@ export default {
     },
   },
   components: {
+    taskinstanceDialog,
     fileMain,
     productList,
     fileUpload,
@@ -479,6 +510,7 @@ export default {
       rules: {},
       dictList: {},
       billDetailDialogFlag: false,
+      taskinstanceDialogFlag: false,
       columns: [
         {
           width: 45,
@@ -539,16 +571,14 @@ export default {
           prop: 'doneTotalCount',
           label: '已采数量',
           slot: 'doneTotalCount',
-          headerSlot: 'doneTotalCount',
           align: "center"
 
         },
         {
           width: 80,
           prop: 'waitTotalCount',
-          label: '未采数量',
-          slot: 'waitTotalCount',
-          headerSlot: 'waitTotalCount',
+          label: '待采数量',
+          // slot: 'waitTotalCount',
           align: "center"
 
         },
@@ -599,6 +629,13 @@ export default {
           showOverflowTooltip: true,
           align: "center"
         },
+        {
+          minWidth: 240,
+          prop: 'taskName',
+          label: '工序',
+          slot: 'taskName',
+          align: "center"
+        },
         {
           width: 160,
           prop: 'productBrand',
@@ -705,6 +742,13 @@ export default {
           slot: 'discountTotalPrice',
           align: "center"
         },
+        {
+          width: 110,
+          prop: 'batchNo',
+          label: '批次号',
+          slot: 'batchNo',
+          align: "center",
+        },
         // {
         //   width: 80,
         //   prop: 'deliveryDays',
@@ -785,7 +829,6 @@ export default {
   },
   methods: {
     handleGetBillDetail(row,type){
-      return
       this.billDetailDialogFlag = true
       this.$nextTick(()=>{
         this.$refs.billDetailDialogRef.open(row,type)
@@ -907,6 +950,17 @@ export default {
       let num = Number(this.form.discountTotalPrice) / Number(this.allPrice) * Number(row.singlePrice)
       return isNaN(num) ? '' : num
     },
+    handleTaskinstance(row,index){
+      this.taskinstanceDialogFlag = true;
+      this.$nextTick(()=>{
+        this.$refs.taskinstanceDialogRef.open(row,index)
+      })
+    },
+    saveTaskInstance(row={}){
+      this.$set(this.form.datasource[row.index], 'taskId', row.id);
+      this.$set(this.form.datasource[row.index], 'taskName', row.name);
+      this.$set(this.form.datasource[row.index], 'routingId', row.produceRoutingId);
+    },
     //获取合计
     getAllPrice(row) {
       let num = 0

+ 14 - 0
src/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue

@@ -263,6 +263,20 @@
             slot: 'productCategoryName',
             align: "center"
           },
+          {
+            minWidth: 150,
+            prop: 'taskName',
+            label: '工序',
+            slot: 'taskName',
+            align: "center"
+          },
+          {
+            width: 110,
+            prop: 'batchNo',
+            label: '批次号',
+            slot: 'batchNo',
+            align: "center",
+          },
           {
             width: 160,
             prop: 'productBrand',

+ 14 - 0
src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue

@@ -253,6 +253,20 @@ export default {
           slot: 'productCategoryName',
           align: 'center'
         },
+        {
+          minWidth: 150,
+          prop: 'taskName',
+          label: '工序',
+          slot: 'taskName',
+          align: "center"
+        },
+        {
+          width: 110,
+          prop: 'batchNo',
+          label: '批次号',
+          slot: 'batchNo',
+          align: "center",
+        },
         {
           width: 160,
           prop: 'productBrand',

+ 14 - 0
src/views/purchasingManage/purchaseOrder/outSourceSend/components/detailDialog.vue

@@ -281,6 +281,20 @@ export default {
           slot: 'totalCount',
           align: "center"
         },
+        {
+          minWidth: 120,
+          prop: 'taskName',
+          label: '工序',
+          slot: 'taskName',
+          align: "center"
+        },
+        {
+          width: 110,
+          prop: 'batchNo',
+          label: '批次号',
+          slot: 'batchNo',
+          align: "center",
+        },
         {
           width: 120,
           prop: 'measuringUnit',

+ 14 - 0
src/views/purchasingManage/purchaseOrder/outSourceSend/components/inventoryTable.vue

@@ -350,6 +350,20 @@ export default {
         //   label: '总数量',
         //   slot: 'orderTotalCount'
         // },
+        {
+          minWidth: 150,
+          prop: 'taskName',
+          label: '工序',
+          slot: 'taskName',
+          align: "center"
+        },
+        {
+          width: 110,
+          prop: 'batchNo',
+          label: '批次号',
+          slot: 'batchNo',
+          align: "center",
+        },
         {
           minWidth: 100,
           prop: 'measuringUnit',

+ 14 - 0
src/views/purchasingManage/purchaseOrder/returnGoods/components/detailDialog.vue

@@ -297,6 +297,20 @@
             slot: 'specification',
             align: "center"
           },
+          {
+            width: 150,
+            prop: 'taskName',
+            label: '工序',
+            slot: 'taskName',
+            align: "center"
+          },
+          {
+            width: 110,
+            prop: 'batchNo',
+            label: '批次号',
+            slot: 'batchNo',
+            align: "center",
+          },
           {
             width: 200,
             prop: 'warehouseName',

+ 14 - 0
src/views/purchasingManage/purchaseOrder/returnGoods/components/inventoryTable.vue

@@ -374,6 +374,20 @@ export default {
           label: '包装规格',
           showOverflowTooltip: true
         },
+        {
+          width: 150,
+          prop: 'taskName',
+          label: '工序',
+          slot: 'taskName',
+          align: "center"
+        },
+        {
+          width: 110,
+          prop: 'batchNo',
+          label: '批次号',
+          slot: 'batchNo',
+          align: "center",
+        },
         {
           width: 200,
           prop: 'warehouseName',

+ 17 - 2
src/views/purchasingManage/purchasePlanManage/components/detailDialog.vue

@@ -153,6 +153,7 @@
         row-key="id"
       >
         <template v-slot:expectReceiveDate="scope">
+
           <div v-if="scope.row.arrivalWay == 1">
             {{ scope.row.expectReceiveDate }}
           </div>
@@ -162,7 +163,7 @@
               :underline="false"
               @click.native="handleMethod(scope.row)"
             >
-              查看分批时间
+              {{ scope.row.expectReceiveDate }}
             </el-link>
           </div>
         </template>
@@ -282,7 +283,14 @@ export default {
         {
           width: 80,
           prop: 'waitTotalCount',
-          label: '未采数量',
+          label: '待采数量',
+          align: "center"
+        },
+        {
+          width: 150,
+          prop: 'taskName',
+          label: '工序',
+          slot: 'taskName',
           align: "center"
         },
         {
@@ -330,6 +338,13 @@ export default {
           slot: 'expectReceiveDate',
           align: 'center'
         },
+        {
+          width: 110,
+          prop: 'batchNo',
+          label: '批次号',
+          slot: 'batchNo',
+          align: "center",
+        },
         {
           width: 160,
           prop: 'technicalDrawings',

+ 59 - 2
src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue

@@ -60,6 +60,12 @@
           >
         </el-form-item>
       </template>
+      <template v-slot:batchNo="scope">
+        <el-form-item
+          :prop="'datasource.' + scope.$index + '.batchNo'">
+          <el-input v-model="scope.row.batchNo"></el-input>
+        </el-form-item>
+      </template>
       <template v-slot:productCode="scope">
         <el-form-item
           style="margin-bottom: 20px"
@@ -161,7 +167,27 @@
           ></el-input>
         </el-form-item>
       </template>
-
+      <template v-slot:taskName="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.taskName'"
+        >
+          <el-input
+            v-model="scope.row.taskName"
+            placeholder="请选择"
+            style="width: 60%; margin-right: 10px"
+            disabled
+          ></el-input>
+          <el-button
+            v-if="scope.row.productCode"
+            size="small"
+            type="primary"
+            @click.native="handleTaskinstance(scope.row, scope.$index)"
+          >选择
+          </el-button
+          >
+        </el-form-item>
+      </template>
       <template v-slot:technicalAnswerName="{ row, $index }">
         <el-form-item
           style="margin-bottom: 20px"
@@ -351,6 +377,8 @@
       :classType="2"
       @changeParent="getSupInfo"
     ></supplierList>
+    <taskinstance-dialog ref="taskinstanceDialogRef" v-if="taskinstanceDialogFlag" @saveTaskInstance="saveTaskInstance" :visible.sync="taskinstanceDialogFlag"></taskinstance-dialog>
+
   </el-form>
 </template>
 <script>
@@ -365,6 +393,7 @@ import supplierList from "@/views/purchasingManage/supplierManage/components/par
 import {getInventoryTotalAPI} from "@/api/wms";
 import {getByCode} from "@/api/system/dictionary-data";
 import fileMain from "@/components/addDoc/index.vue";
+import taskinstanceDialog from "@/BIZComponents/procedure/taskinstanceDialog.vue";
 
 export default {
   mixins: [dictMixins],
@@ -375,6 +404,7 @@ export default {
     }
   },
   components: {
+    taskinstanceDialog,
     fileMain,
     supplierList,
     productList,
@@ -414,6 +444,7 @@ export default {
       form: {
         datasource: []
       },
+      taskinstanceDialogFlag:false,
       rules: {},
       dictList: {},
       columns: [
@@ -476,6 +507,13 @@ export default {
           headerSlot: 'headerExpectReceiveDate',
           align: "center"
         },
+        {
+          width: 110,
+          prop: 'batchNo',
+          label: '批次号',
+          slot: 'batchNo',
+          align: "center",
+        },
         {
           width: 130,
           prop: 'supplierName',
@@ -484,6 +522,13 @@ export default {
           headerSlot: 'headerSupplierName',
           align: "center",
         },
+        {
+          width: 240,
+          prop: 'taskName',
+          label: '工序',
+          slot: 'taskName',
+          align: "center"
+        },
         {
           width: 130,
           prop: 'brand',
@@ -648,6 +693,18 @@ export default {
       row.arrivalBatch = copyObj(arrivalBatch);
       this.$set(this.form.datasource[this.curIndex], 'arrivalBatch', copyObj(arrivalBatch))
     },
+    handleTaskinstance(row,index){
+      this.taskinstanceDialogFlag = true;
+      this.$nextTick(()=>{
+        this.$refs.taskinstanceDialogRef.open(row,index)
+      })
+
+    },
+    saveTaskInstance(row={}){
+      this.$set(this.form.datasource[row.index], 'taskId', row.id);
+      this.$set(this.form.datasource[row.index], 'taskName', row.name);
+      this.$set(this.form.datasource[row.index], 'routingId', row.produceRoutingId);
+    },
     //获取供应商信息
     handleGetSup(e, row, index) {
       this.curIndex = index
@@ -781,7 +838,7 @@ export default {
             this.$message.warning(messages[0].message);
 
           }
-        
+
           }
         callback(valid);
       });

+ 0 - 1
src/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue

@@ -623,7 +623,6 @@ export default {
         this.form.sendNo = this.form.docNo
         this.form.docNo = ''
         this.form.id = ''
-        this.form.repliedFiles = []
         this.$refs.taskInfoTableRef && this.$refs.taskInfoTableRef.putTableValue(data.logisticTrakListNoteVOList)
         this.$refs.stowageTableRef && this.$refs.stowageTableRef.putTableValue(data.carList)
         this.$refs.palletTableRef && this.$refs.palletTableRef.putTableValue(data.trayList);

+ 2 - 2
src/views/saleManage/saleOrder/invoiceConfirm/components/detailDialog.vue

@@ -61,7 +61,7 @@
             <el-form-item
               label="发货附件:"
               prop="sendFiles">
-              <fileMain v-model="row.sendFiles" type="view"></fileMain>
+              <fileMain v-model="form.sendFiles" type="view"></fileMain>
               <!--            <div v-if="detailData.sendFiles && detailData.sendFiles?.length">-->
               <!--              <el-link-->
               <!--                v-for="link in detailData.sendFiles"-->
@@ -78,7 +78,7 @@
               label="回执附件:"
               prop="sendFiles"
             >
-              <fileMain v-model="row.repliedFiles" type="view"></fileMain>
+              <fileMain v-model="form.repliedFiles" type="view"></fileMain>
               <!--            <div v-if="detailData.repliedFiles && detailData.repliedFiles?.length">-->
               <!--              <el-link-->
               <!--                v-for="link in detailData.repliedFiles"-->

+ 139 - 0
src/views/saleManage/saleOrder/invoiceConfirm/components/searchTable.vue

@@ -0,0 +1,139 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form
+    label-width="130px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="发货确认单编码:" prop="docNo">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.docNo"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }" v-if="!saleOrderId">
+        <el-form-item label="发货单编码:" prop="sendNo">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.sendNo"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="是否回执:" prop="replied">
+          <el-select
+            v-model="params.replied"
+            placeholder="请选择"
+            class="w100"
+            clearable
+          >
+            <el-option
+              v-for="item in repliedOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <!--        <el-form-item label="审核状态:" prop="reviewStatus">-->
+        <!--          <el-select v-model="params.reviewStatus" placeholder="请选择" class="w100" clearable>-->
+        <!--            <el-option-->
+        <!--              v-for="item in reviewStatusEnum"-->
+        <!--              :key="item.value"-->
+        <!--              :label="item.label"-->
+        <!--              :value="item.value"-->
+        <!--            ></el-option>-->
+        <!--          </el-select>-->
+        <!--        </el-form-item>-->
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="客户名称:" prop="contactName">
+          <el-input
+            placeholder="请输入"
+            style="max-width: 320px"
+            v-model.trim="params.contactName"
+            controls-position="right"
+          >
+          </el-input>
+        </el-form-item>
+      </el-col>
+    </el-row>
+    <el-row :gutter="15">
+
+      <el-col
+        style="display: flex; justify-content: end"
+        v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }"
+      >
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+          >
+            查询
+          </el-button>
+          <el-button @click="reset">重置</el-button>
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+<script>
+import { reviewStatusEnum } from '@/enum/dict';
+const repliedOptions = [
+  { value: 0, label: '否' },
+  { value: 1, label: '是' }
+];
+export default {
+  data() {
+    // 默认表单数据
+    const defaultParams = {
+      docNo: '',
+      sendNo: '',
+      replied: null,
+      reviewStatus: null,
+    };
+    return {
+      reviewStatusEnum,
+      defaultParams,
+      repliedOptions,
+      // 表单数据
+      params: { ...defaultParams }
+    };
+  },
+  props: {
+    saleOrderId: ''
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  methods: {
+    //选择时间
+    changeDate(e) {
+      this.createTime = e;
+    },
+    /* 搜索 */
+    search() {
+      this.$emit('search', {
+        ...this.params
+      });
+    },
+    /*  重置 */
+    reset() {
+      this.createTime = [];
+      this.params = Object.assign({}, { ...this.defaultParams });
+      this.search();
+    }
+  }
+};
+</script>

+ 1 - 1
src/views/saleManage/saleOrder/invoiceConfirm/index.vue

@@ -145,7 +145,7 @@
 </template>
 
 <script>
-import searchTable from '../invoice/components/searchTable.vue';
+import searchTable from './components/searchTable.vue';
 import addInvoiceDialog from './components/addInvoiceDialog.vue';
 import detailDialog from './components/detailDialog.vue';
 import popModal from '@/components/pop-modal';