Просмотр исходного кода

库存表格优化:移除冗余样式属性,新增机型颜色字典项,完善日期格式处理

yusheng 1 год назад
Родитель
Сommit
0d3d3b8852
30 измененных файлов с 933 добавлено и 325 удалено
  1. 97 75
      src/BIZComponents/inventoryTable.vue
  2. 15 0
      src/BIZComponents/inventoryTableDetails.vue
  3. 6 1
      src/BIZComponents/setAllValue.vue
  4. 13 4
      src/components/Dict/DictSelection.vue
  5. 3 1
      src/enum/dict.js
  6. 1 0
      src/store/modules/dict.js
  7. 18 9
      src/views/purchasingManage/inquiryManage/components/inquiryTable.vue
  8. 62 39
      src/views/purchasingManage/inquiryManage/components/inventoryTable.vue
  9. 16 0
      src/views/purchasingManage/purchaseNeedManage/components/detailDialog.vue
  10. 68 1
      src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue
  11. 16 9
      src/views/purchasingManage/purchaseOrder/components/detailDialog.vue
  12. 75 27
      src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue
  13. 1 1
      src/views/purchasingManage/purchaseOrder/index.vue
  14. 14 0
      src/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue
  15. 77 64
      src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue
  16. 17 5
      src/views/purchasingManage/purchaseOrder/invoiceConfirm/components/addInvoiceDialog.vue
  17. 14 7
      src/views/purchasingManage/purchaseOrder/outSourceSend/components/detailDialog.vue
  18. 70 3
      src/views/purchasingManage/purchaseOrder/outSourceSend/components/inventoryTable.vue
  19. 16 0
      src/views/purchasingManage/purchaseOrder/returnGoods/components/detailDialog.vue
  20. 14 1
      src/views/purchasingManage/purchaseOrder/returnGoods/components/inventoryTable.vue
  21. 16 6
      src/views/purchasingManage/purchasePlanManage/components/detailDialog.vue
  22. 68 1
      src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue
  23. 19 0
      src/views/saleManage/saleOrder/entrustedReceive/components/detailDialog.vue
  24. 64 2
      src/views/saleManage/saleOrder/entrustedReceive/components/inventoryTable.vue
  25. 21 46
      src/views/saleManage/saleOrder/exceptionManagement/components/addOrEditDialog.vue
  26. 77 14
      src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue
  27. 22 8
      src/views/saleManage/saleOrder/invoice/components/inventoryTableDetails.vue
  28. 17 0
      src/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue
  29. 15 0
      src/views/saleManage/saleOrder/invoiceConfirm/components/detailDialog.vue
  30. 1 1
      vue.config.js

+ 97 - 75
src/BIZComponents/inventoryTable.vue

@@ -99,7 +99,6 @@
       </template>
       </template>
       <template v-slot:productName="{ row, $index }">
       <template v-slot:productName="{ row, $index }">
         <el-form-item
         <el-form-item
-          style="margin-bottom: 20px"
           :prop="'datasource.' + $index + '.productName'"
           :prop="'datasource.' + $index + '.productName'"
           :rules="{
           :rules="{
             required: true,
             required: true,
@@ -177,16 +176,12 @@
       </template>
       </template>
 
 
       <template v-slot:productCode="scope">
       <template v-slot:productCode="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '.productCode'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '.productCode'">
           <el-input v-model="scope.row.productCode" :disabled="true"></el-input>
           <el-input v-model="scope.row.productCode" :disabled="true"></el-input>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
       <template v-slot:productCategoryName="scope">
       <template v-slot:productCategoryName="scope">
         <el-form-item
         <el-form-item
-          style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.productCategoryName'"
           :prop="'datasource.' + scope.$index + '.productCategoryName'"
         >
         >
           <el-input v-model="scope.row.productCategoryName" disabled></el-input>
           <el-input v-model="scope.row.productCategoryName" disabled></el-input>
@@ -194,7 +189,7 @@
       </template>
       </template>
       <!-- <template v-slot:totalCount="scope">
       <!-- <template v-slot:totalCount="scope">
         <el-form-item
         <el-form-item
-          style="margin-bottom: 20px"
+         
           :prop="'datasource.' + scope.$index + '.totalCount'"
           :prop="'datasource.' + scope.$index + '.totalCount'"
           :rules="{
           :rules="{
             required: isTotalCount ? true : false,
             required: isTotalCount ? true : false,
@@ -214,19 +209,13 @@
         <span :class="{ 'is-required': isTotalCount }">{{ column.label }}</span>
         <span :class="{ 'is-required': isTotalCount }">{{ column.label }}</span>
       </template>
       </template>
       <template v-slot:totalPrice="scope">
       <template v-slot:totalPrice="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '.totalPrice'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '.totalPrice'">
           {{ (Number(scope.row.totalPrice) || 0).toFixed(2) }}元
           {{ (Number(scope.row.totalPrice) || 0).toFixed(2) }}元
         </el-form-item>
         </el-form-item>
       </template>
       </template>
 
 
       <template v-slot:productBrand="scope">
       <template v-slot:productBrand="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '.productBrand'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '.productBrand'">
           <el-input
           <el-input
             v-model="scope.row.productBrand"
             v-model="scope.row.productBrand"
             :disabled="!!scope.row.productCode"
             :disabled="!!scope.row.productCode"
@@ -235,10 +224,7 @@
       </template>
       </template>
 
 
       <template v-slot:modelType="scope">
       <template v-slot:modelType="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '.modelType'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '.modelType'">
           <el-input
           <el-input
             v-model="scope.row.modelType"
             v-model="scope.row.modelType"
             :disabled="!!scope.row.productCode"
             :disabled="!!scope.row.productCode"
@@ -246,10 +232,7 @@
         </el-form-item>
         </el-form-item>
       </template>
       </template>
       <template v-slot:specification="scope">
       <template v-slot:specification="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '.specification'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '.specification'">
           <el-input
           <el-input
             v-model="scope.row.specification"
             v-model="scope.row.specification"
             :disabled="!!scope.row.productCode"
             :disabled="!!scope.row.productCode"
@@ -266,7 +249,6 @@
         <div class="period">
         <div class="period">
           <div class="borderleftnone">
           <div class="borderleftnone">
             <el-form-item
             <el-form-item
-              style="margin-bottom: 20px"
               :prop="'datasource.' + scope.$index + '.guaranteePeriod'"
               :prop="'datasource.' + scope.$index + '.guaranteePeriod'"
               :rules="{
               :rules="{
                 pattern: numberReg,
                 pattern: numberReg,
@@ -291,16 +273,14 @@
               @change="
               @change="
                 setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
                 setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
               "
               "
+              :isOne="scope.$index === 0"
             >
             >
             </DictSelection>
             </DictSelection>
           </div>
           </div>
         </div>
         </div>
       </template>
       </template>
       <template v-slot:measuringUnit="scope">
       <template v-slot:measuringUnit="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '.measuringUnit'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '.measuringUnit'">
           <el-input
           <el-input
             v-model="scope.row.measuringUnit"
             v-model="scope.row.measuringUnit"
             :disabled="!!scope.row.productCode"
             :disabled="!!scope.row.productCode"
@@ -309,10 +289,7 @@
         </el-form-item>
         </el-form-item>
       </template>
       </template>
       <template v-slot:remark="scope">
       <template v-slot:remark="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '.remark'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '.remark'">
           <el-input
           <el-input
             v-model="scope.row.remark"
             v-model="scope.row.remark"
             type="textarea"
             type="textarea"
@@ -322,7 +299,6 @@
       </template>
       </template>
       <template v-slot:singlePrice="scope">
       <template v-slot:singlePrice="scope">
         <el-form-item
         <el-form-item
-          style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.singlePrice'"
           :prop="'datasource.' + scope.$index + '.singlePrice'"
           :rules="{
           :rules="{
             required: isSinglePrice ? true : false,
             required: isSinglePrice ? true : false,
@@ -342,7 +318,7 @@
       </template>
       </template>
       <!-- <template v-slot:notaxSinglePrice="scope">
       <!-- <template v-slot:notaxSinglePrice="scope">
         <el-form-item
         <el-form-item
-          style="margin-bottom: 20px"
+         
           :prop="'datasource.' + scope.$index + '.notaxSinglePrice'"
           :prop="'datasource.' + scope.$index + '.notaxSinglePrice'"
         >
         >
           <el-input
           <el-input
@@ -356,10 +332,7 @@
       </template> -->
       </template> -->
 
 
       <template v-slot:taxRate="scope">
       <template v-slot:taxRate="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '.taxRate'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '.taxRate'">
           <el-input
           <el-input
             v-model="scope.row.taxRate"
             v-model="scope.row.taxRate"
             placeholder="请输入"
             placeholder="请输入"
@@ -383,10 +356,7 @@
       </template>
       </template>
 
 
       <template v-slot:technicalAnswerName="{ row, $index }">
       <template v-slot:technicalAnswerName="{ row, $index }">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + $index + '.technicalAnswerName'"
-        >
+        <el-form-item :prop="'datasource.' + $index + '.technicalAnswerName'">
           <el-input
           <el-input
             v-model="row.technicalAnswerName"
             v-model="row.technicalAnswerName"
             placeholder="请输入"
             placeholder="请输入"
@@ -395,10 +365,7 @@
         </el-form-item>
         </el-form-item>
       </template>
       </template>
       <template v-slot:technicalParams="scope">
       <template v-slot:technicalParams="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '.technicalParams'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '.technicalParams'">
           <el-input
           <el-input
             type="textarea"
             type="textarea"
             v-model="scope.row.technicalParams"
             v-model="scope.row.technicalParams"
@@ -408,7 +375,6 @@
       </template>
       </template>
       <template v-slot:technicalDrawings="scope">
       <template v-slot:technicalDrawings="scope">
         <el-form-item
         <el-form-item
-          style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.technicalDrawings'"
           :prop="'datasource.' + scope.$index + '.technicalDrawings'"
         >
         >
           <fileMain v-model="scope.row.technicalDrawings"></fileMain>
           <fileMain v-model="scope.row.technicalDrawings"></fileMain>
@@ -416,7 +382,6 @@
       </template>
       </template>
       <template v-slot:customerReqFiles="scope">
       <template v-slot:customerReqFiles="scope">
         <el-form-item
         <el-form-item
-          style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.customerReqFiles'"
           :prop="'datasource.' + scope.$index + '.customerReqFiles'"
         >
         >
           <fileMain v-model="scope.row.customerReqFiles"></fileMain>
           <fileMain v-model="scope.row.customerReqFiles"></fileMain>
@@ -424,7 +389,6 @@
       </template>
       </template>
       <template v-slot:industryArtFiles="scope">
       <template v-slot:industryArtFiles="scope">
         <el-form-item
         <el-form-item
-          style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.industryArtFiles'"
           :prop="'datasource.' + scope.$index + '.industryArtFiles'"
           :rules="{
           :rules="{
             required: false,
             required: false,
@@ -436,10 +400,7 @@
         </el-form-item>
         </el-form-item>
       </template>
       </template>
       <template v-slot:otherFiles="scope">
       <template v-slot:otherFiles="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '. otherFiles'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '. otherFiles'">
           <fileMain v-model="scope.row.otherFiles"></fileMain>
           <fileMain v-model="scope.row.otherFiles"></fileMain>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
@@ -460,6 +421,7 @@
         >
         >
           <el-date-picker
           <el-date-picker
             style="width: 140px"
             style="width: 140px"
+            value-format="yyyy-MM-dd"
             v-model="scope.row.produceDeliveryDeadline"
             v-model="scope.row.produceDeliveryDeadline"
             @change="
             @change="
               setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
               setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
@@ -486,6 +448,7 @@
           <el-date-picker
           <el-date-picker
             style="width: 140px"
             style="width: 140px"
             v-model="scope.row.customerExpectDeliveryDeadline"
             v-model="scope.row.customerExpectDeliveryDeadline"
+            value-format="yyyy-MM-dd"
             @change="
             @change="
               setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
               setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
             "
             "
@@ -494,10 +457,7 @@
           >
           >
           </el-date-picker>
           </el-date-picker>
         </el-form-item>
         </el-form-item>
-        <el-form-item
-          style="margin-bottom: 20px"
-          v-if="scope.row.arrivalWay == 2"
-        >
+        <el-form-item v-if="scope.row.arrivalWay == 2">
           <el-link
           <el-link
             type="primary"
             type="primary"
             :underline="false"
             :underline="false"
@@ -515,6 +475,7 @@
             v-model="scope.row.provenance"
             v-model="scope.row.provenance"
             collapse-tags
             collapse-tags
             multiple
             multiple
+            :isOne="scope.$index === 0"
           >
           >
           </DictSelection>
           </DictSelection>
         </el-form-item>
         </el-form-item>
@@ -527,16 +488,14 @@
             style="width: 140px"
             style="width: 140px"
             v-model="scope.row.guaranteePeriodDeadline"
             v-model="scope.row.guaranteePeriodDeadline"
             type="date"
             type="date"
+            value-format="yyyy-MM-dd"
             placeholder="选择日期"
             placeholder="选择日期"
           >
           >
           </el-date-picker>
           </el-date-picker>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
       <template v-slot:singleWeight="scope">
       <template v-slot:singleWeight="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '.singleWeight'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '.singleWeight'">
           <el-input
           <el-input
             v-model="scope.row.singleWeight"
             v-model="scope.row.singleWeight"
             @input="changeCount(scope.row, scope.$index)"
             @input="changeCount(scope.row, scope.$index)"
@@ -587,10 +546,7 @@
       </template>
       </template>
 
 
       <template v-slot:taskName="scope">
       <template v-slot:taskName="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + scope.$index + '.taskName'"
-        >
+        <el-form-item :prop="'datasource.' + scope.$index + '.taskName'">
           <el-input
           <el-input
             v-model="scope.row.taskName"
             v-model="scope.row.taskName"
             placeholder="请选择"
             placeholder="请选择"
@@ -613,7 +569,6 @@
             v-model="scope.row.arrivalWay"
             v-model="scope.row.arrivalWay"
             clearable
             clearable
             style="width: 100%"
             style="width: 100%"
-  
           >
           >
             <el-option
             <el-option
               v-for="item in arrivalWayList"
               v-for="item in arrivalWayList"
@@ -627,7 +582,6 @@
       </template>
       </template>
       <template v-slot:batchNo="scope">
       <template v-slot:batchNo="scope">
         <el-form-item
         <el-form-item
-          style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.batchNo'"
           :prop="'datasource.' + scope.$index + '.batchNo'"
           :rules="[
           :rules="[
             {
             {
@@ -683,13 +637,13 @@
             clearable
             clearable
             v-model="row.goodsPriceType"
             v-model="row.goodsPriceType"
             @change="goodsPriceTypeChange(row, $index)"
             @change="goodsPriceTypeChange(row, $index)"
+            :isOne="$index === 0"
           >
           >
           </DictSelection>
           </DictSelection>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
       <template v-slot:saleCount="scope">
       <template v-slot:saleCount="scope">
         <el-form-item
         <el-form-item
-          style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.' + countObj.countKey"
           :prop="'datasource.' + scope.$index + '.' + countObj.countKey"
           :rules="{
           :rules="{
             required: isTotalCount ? true : false,
             required: isTotalCount ? true : false,
@@ -709,7 +663,6 @@
       </template>
       </template>
       <template v-slot:saleUnit="scope">
       <template v-slot:saleUnit="scope">
         <el-form-item
         <el-form-item
-          style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.' + countObj.unitIdKey"
           :prop="'datasource.' + scope.$index + '.' + countObj.unitIdKey"
         >
         >
           <el-select
           <el-select
@@ -727,6 +680,36 @@
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
+      <template v-slot:modelKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'modelKey'">
+          <DictSelection
+            dictName="物品机型"
+            clearable
+            v-model="scope.row.modelKey"
+            :isOne="scope.$index === 0"
+            filterable
+            allow-create
+            default-first-option
+            multiple
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
+      <template v-slot:colorKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'colorKey'">
+          <DictSelection
+            dictName="物品颜色"
+            clearable
+            v-model="scope.row.colorKey"
+            :isOne="scope.$index === 0"
+            filterable
+            allow-create
+            default-first-option
+            multiple
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
       <!-- 操作列 -->
       <!-- 操作列 -->
       <template v-slot:action="scope">
       <template v-slot:action="scope">
         <el-popconfirm
         <el-popconfirm
@@ -1270,7 +1253,20 @@
             slot: 'modelType',
             slot: 'modelType',
             align: 'center'
             align: 'center'
           },
           },
-
+          {
+            width: 160,
+            prop: 'modelKey',
+            label: '机型',
+            slot: 'modelKey',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'colorKey',
+            label: '颜色',
+            slot: 'colorKey',
+            align: 'center'
+          },
           {
           {
             width: 120,
             width: 120,
             prop: 'produceType',
             prop: 'produceType',
@@ -1436,9 +1432,9 @@
     },
     },
 
 
     created() {
     created() {
-      this.requestDict('保质期单位');
-      this.requestDict('产地');
-      this.requestDict('商品价格类型');
+      // this.requestDict('保质期单位');
+      // this.requestDict('产地');
+      // this.requestDict('商品价格类型');
       parameterGetByCode({
       parameterGetByCode({
         code: 'eom_inventoryTable_customerExpectDeliveryDeadline'
         code: 'eom_inventoryTable_customerExpectDeliveryDeadline'
       }).then((res) => {
       }).then((res) => {
@@ -1566,7 +1562,10 @@
       },
       },
       // 返回列表数据
       // 返回列表数据
       getTableValue() {
       getTableValue() {
-        let comitDatasource = this.form.datasource;
+        let comitDatasource = copyObj(this.form.datasource);
+        // console.log(comitDatasource)
+        // console.log(this.form.datasource)
+        // return
         if (comitDatasource.length === 0) return [];
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach((v) => {
         comitDatasource.forEach((v) => {
           if (v.guaranteePeriodUnitCode) {
           if (v.guaranteePeriodUnitCode) {
@@ -1575,6 +1574,12 @@
               v.guaranteePeriodUnitCode
               v.guaranteePeriodUnitCode
             );
             );
           }
           }
+          if (v.modelKey) {
+            v.modelKey = v.modelKey.toString();
+          }
+          if (v.colorKey) {
+            v.colorKey = v.colorKey.toString();
+          }
           v.technicalDrawings = v.technicalDrawings ? v.technicalDrawings : [];
           v.technicalDrawings = v.technicalDrawings ? v.technicalDrawings : [];
           v.customerReqFiles = v.customerReqFiles || [];
           v.customerReqFiles = v.customerReqFiles || [];
           v.industryArtFiles = v.industryArtFiles || [];
           v.industryArtFiles = v.industryArtFiles || [];
@@ -1698,6 +1703,12 @@
 
 
           productList.forEach((item, index) => {
           productList.forEach((item, index) => {
             item['key'] = index + 1;
             item['key'] = index + 1;
+            if (item.modelKey) {
+              item.modelKey = item.modelKey.split(',');
+            }
+            if (item.colorKey) {
+              item.colorKey = item.colorKey.split(',');
+            }
             item.pricingWay =
             item.pricingWay =
               item.pricingWay ||
               item.pricingWay ||
               data.pricingWay ||
               data.pricingWay ||
@@ -1819,7 +1830,12 @@
           this.$set(parasm, 'pricingWay', 1);
           this.$set(parasm, 'pricingWay', 1);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
           this.$set(parasm, 'guaranteePeriod', item.warrantyPeriod);
           this.$set(parasm, 'guaranteePeriod', item.warrantyPeriod);
-
+          if (item.modelKey) {
+            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+          }
+          if (item.colorKey) {
+            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+          }
           this.$set(
           this.$set(
             parasm,
             parasm,
             'guaranteePeriodUnitCode',
             'guaranteePeriodUnitCode',
@@ -1946,6 +1962,12 @@
             this.$set(parasm, 'discountSinglePrice', goodsPriceList.unitPrice);
             this.$set(parasm, 'discountSinglePrice', goodsPriceList.unitPrice);
             this.$set(parasm, 'totalCount', '');
             this.$set(parasm, 'totalCount', '');
           }
           }
+          if (item.modelKey) {
+            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+          }
+          if (item.colorKey) {
+            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+          }
           if (this.isSupplier) {
           if (this.isSupplier) {
             this.$set(
             this.$set(
               parasm,
               parasm,

+ 15 - 0
src/BIZComponents/inventoryTableDetails.vue

@@ -493,7 +493,22 @@
             slot: 'modelType',
             slot: 'modelType',
             align: 'center'
             align: 'center'
           },
           },
+          {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
 
 
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
+
+          },
           {
           {
             width: 120,
             width: 120,
             prop: 'imgCode',
             prop: 'imgCode',

+ 6 - 1
src/BIZComponents/setAllValue.vue

@@ -20,7 +20,12 @@
     >
     >
       <div>
       <div>
         {{ title }}:
         {{ title }}:
-        <el-date-picker v-model="value" type="date" placeholder="选择日期">
+        <el-date-picker
+          v-model="value"
+          type="date"
+          placeholder="选择日期"
+          value-format="yyyy-MM-dd"
+        >
         </el-date-picker>
         </el-date-picker>
       </div>
       </div>
       <div slot="footer" class="footer">
       <div slot="footer" class="footer">

+ 13 - 4
src/components/Dict/DictSelection.vue

@@ -6,7 +6,6 @@
     v-on="$listeners"
     v-on="$listeners"
     :disabled="disabled"
     :disabled="disabled"
     filterable
     filterable
-
     size="small"
     size="small"
   >
   >
     <el-option
     <el-option
@@ -28,7 +27,7 @@
     },
     },
     props: {
     props: {
       value: {
       value: {
-        type: [String, Number,Array],
+        type: [String, Number, Array],
         default: ''
         default: ''
       },
       },
       dictName: {
       dictName: {
@@ -47,6 +46,11 @@
       disabled: {
       disabled: {
         type: Boolean,
         type: Boolean,
         default: false
         default: false
+      },
+      //列表使用了多个时,防止多次请求
+      isOne: {
+        type: Boolean,
+        default: true
       }
       }
     },
     },
     data() {
     data() {
@@ -55,9 +59,13 @@
     computed: {
     computed: {
       ...mapGetters(['dict', 'getDict']),
       ...mapGetters(['dict', 'getDict']),
       dictList() {
       dictList() {
+
         return (
         return (
           (this.listFormatte &&
           (this.listFormatte &&
-            this.listFormatte(this.dict[dictEnum[this.dictName]] || [],this.value)) ||
+            this.listFormatte(
+              this.dict[dictEnum[this.dictName]] || [],
+              this.value
+            )) ||
           this.dict[dictEnum[this.dictName]] ||
           this.dict[dictEnum[this.dictName]] ||
           []
           []
         );
         );
@@ -76,7 +84,8 @@
       }
       }
     },
     },
     created() {
     created() {
-      if (this.dictName) {
+      if (this.dictName&&this.isOne) {
+        console.log(this.dictName,'this.dictName')
         this.requestDict(this.dictName);
         this.requestDict(this.dictName);
       }
       }
     },
     },

+ 3 - 1
src/enum/dict.js

@@ -63,7 +63,9 @@ export default {
   产地: 'purchase_origin',
   产地: 'purchase_origin',
   故障等级: 'fault_level',
   故障等级: 'fault_level',
   商品价格类型: 'goods_price_type',
   商品价格类型: 'goods_price_type',
-  规则状态: 'rule_status'
+  规则状态: 'rule_status',
+  物品机型: 'product_model_key',
+  物品颜色: 'product_color_key'
 };
 };
 
 
 export const numberList = [
 export const numberList = [

+ 1 - 0
src/store/modules/dict.js

@@ -24,6 +24,7 @@ const mutations = {
 const actions = {
 const actions = {
   // 根据字典enumName请求字典 已获取的不做重复请求
   // 根据字典enumName请求字典 已获取的不做重复请求
   async requestDict({ commit, state }, enumName) {
   async requestDict({ commit, state }, enumName) {
+ 
     const code = dictEnum[enumName];
     const code = dictEnum[enumName];
 
 
     if (state[code]?.length) return state[code];
     if (state[code]?.length) return state[code];

+ 18 - 9
src/views/purchasingManage/inquiryManage/components/inquiryTable.vue

@@ -325,7 +325,6 @@
         <el-form-item
         <el-form-item
           style="margin-bottom: 20px"
           style="margin-bottom: 20px"
           :prop="'resultList.' + scope.$index + '.purchaseUnitId'"
           :prop="'resultList.' + scope.$index + '.purchaseUnitId'"
-  
         >
         >
           <el-select
           <el-select
             v-model="scope.row.purchaseUnitId"
             v-model="scope.row.purchaseUnitId"
@@ -674,12 +673,22 @@
             minWidth: 200
             minWidth: 200
           },
           },
 
 
-          // {
-          //   width: 130,
-          //   prop: 'brand',
-          //   label: '品牌',
-          //   slot: 'brand'
-          // },
+            {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
+
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
+
+          },
           {
           {
             minWidth: 80,
             minWidth: 80,
             prop: 'deliveryDays',
             prop: 'deliveryDays',
@@ -887,7 +896,7 @@
           })
           })
         );
         );
         this.getNotaxSinglePrice();
         this.getNotaxSinglePrice();
-        this.totalPriceAll()
+        this.totalPriceAll();
         this.$forceUpdate();
         this.$forceUpdate();
       },
       },
       //计算不含税单价
       //计算不含税单价
@@ -1001,7 +1010,7 @@
           num += item.totalPrice || 0;
           num += item.totalPrice || 0;
         });
         });
         this.form.totalPrice = parseFloat(num.toFixed(2));
         this.form.totalPrice = parseFloat(num.toFixed(2));
-        this.form.preferentialPrice=this.form.totalPrice
+        this.form.preferentialPrice = this.form.totalPrice;
       },
       },
       // 返回列表数据
       // 返回列表数据
       getTableValue() {
       getTableValue() {

+ 62 - 39
src/views/purchasingManage/inquiryManage/components/inventoryTable.vue

@@ -129,7 +129,7 @@
   import { levelList } from '@/enum/dict.js';
   import { levelList } from '@/enum/dict.js';
 
 
   export default {
   export default {
-    mixins: [dictMixins,tabMixins],
+    mixins: [dictMixins, tabMixins],
     components: {
     components: {
       // fileMain,
       // fileMain,
       fileUpload,
       fileUpload,
@@ -153,7 +153,7 @@
 
 
       return {
       return {
         taskinstanceDialogFlag: false,
         taskinstanceDialogFlag: false,
-        cacheKeyUrl:"eom-purchasingManage-inventoryTable",
+        cacheKeyUrl: 'eom-purchasingManage-inventoryTable',
         numberReg,
         numberReg,
         defaultForm,
         defaultForm,
         supplierList: [],
         supplierList: [],
@@ -165,7 +165,7 @@
         dictList: {},
         dictList: {},
         files: [],
         files: [],
         rules: {},
         rules: {},
-        columnsVersion:1
+        columnsVersion: 1
       };
       };
     },
     },
     computed: {
     computed: {
@@ -173,7 +173,7 @@
         return this.form.datasource.length;
         return this.form.datasource.length;
       },
       },
       columns() {
       columns() {
-        let columnsVersion=this.columnsVersion
+        let columnsVersion = this.columnsVersion;
 
 
         return [
         return [
           {
           {
@@ -215,7 +215,13 @@
             filterMethod: this.isInquiryFn,
             filterMethod: this.isInquiryFn,
             // sortable: true,
             // sortable: true,
             formatter: (row, column) => {
             formatter: (row, column) => {
-              return row.isInquiry==1?'部分核价':row.isInquiry==2?'全部核价完成':row.isInquiry==3?'核价中':'未核价'
+              return row.isInquiry == 1
+                ? '部分核价'
+                : row.isInquiry == 2
+                ? '全部核价完成'
+                : row.isInquiry == 3
+                ? '核价中'
+                : '未核价';
             },
             },
             align: 'center'
             align: 'center'
           },
           },
@@ -278,7 +284,7 @@
             label: '单位',
             label: '单位',
             align: 'center'
             align: 'center'
           },
           },
- 
+
           {
           {
             minWidth: 180,
             minWidth: 180,
             prop: 'packingSpecification',
             prop: 'packingSpecification',
@@ -319,7 +325,7 @@
             slot: 'availableCountBase',
             slot: 'availableCountBase',
             align: 'center'
             align: 'center'
           },
           },
-     
+
           {
           {
             minWidth: 130,
             minWidth: 130,
             prop: 'modelType',
             prop: 'modelType',
@@ -343,7 +349,7 @@
             label: '已核价数量',
             label: '已核价数量',
             align: 'center'
             align: 'center'
           },
           },
-        
+
           {
           {
             width: 120,
             width: 120,
             prop: 'totalWeight',
             prop: 'totalWeight',
@@ -379,22 +385,30 @@
             minWidth: 200,
             minWidth: 200,
             showOverflowTooltip: true,
             showOverflowTooltip: true,
             formatter: (row, column) => {
             formatter: (row, column) => {
-       
               return row.provenance && row.provenance.length
               return row.provenance && row.provenance.length
                 ? row.provenance
                 ? row.provenance
-                    .map((item) => this.getDictValue('产地', item ))
+                    .map((item) => this.getDictValue('产地', item))
                     .join(',')
                     .join(',')
                 : '';
                 : '';
             }
             }
           },
           },
-  
-          // {
-          //     width: 120,
-          //     prop: 'singleWeight',
-          //     label: '单重',
-          //     slot: 'singleWeight',
-          //     align: 'center'
-          //   },
+
+            {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
+
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
+
+          },
 
 
           {
           {
             minWidth: 120,
             minWidth: 120,
@@ -410,12 +424,13 @@
             label: '属性类型',
             label: '属性类型',
             showOverflowTooltip: true,
             showOverflowTooltip: true,
             formatter: (row, column) => {
             formatter: (row, column) => {
-              if(row.produceType){
-                return row.produceType.map(item=>{
-                  return lbjtList[item]
-                }).toString()
+              if (row.produceType) {
+                return row.produceType
+                  .map((item) => {
+                    return lbjtList[item];
+                  })
+                  .toString();
               }
               }
-          
             }
             }
           },
           },
           // {
           // {
@@ -425,7 +440,7 @@
           //   label: '批准文号',
           //   label: '批准文号',
           //   showOverflowTooltip: true
           //   showOverflowTooltip: true
           // },
           // },
- 
+
           // {
           // {
           //   width: 130,
           //   width: 130,
           //   prop: 'brand',
           //   prop: 'brand',
@@ -469,7 +484,6 @@
       }
       }
     },
     },
     created() {
     created() {
-     
       this.requestDict('生产类型');
       this.requestDict('生产类型');
     },
     },
     methods: {
     methods: {
@@ -498,7 +512,11 @@
             //供应商列表
             //供应商列表
             item.resultList.forEach((val) => {
             item.resultList.forEach((val) => {
               //供应商产品
               //供应商产品
-              if (val.productCode == productItem.productCode&&val.batchNo == productItem.batchNo&&val.taskId == productItem.taskId) {
+              if (
+                val.productCode == productItem.productCode &&
+                val.batchNo == productItem.batchNo &&
+                val.taskId == productItem.taskId
+              ) {
                 totalCountS.push(
                 totalCountS.push(
                   Number(val.totalCount || 0) +
                   Number(val.totalCount || 0) +
                     Number(productItem.doneTotalCount || 0)
                     Number(productItem.doneTotalCount || 0)
@@ -550,21 +568,26 @@
           let supplierList = [],
           let supplierList = [],
             supplierIds = [];
             supplierIds = [];
           this.form.datasource = data;
           this.form.datasource = data;
-          let codeList = this.form.datasource.filter((item) => item.productCode).map((item) => item.productCode);
+          let codeList = this.form.datasource
+            .filter((item) => item.productCode)
+            .map((item) => item.productCode);
           //获取仓库库存
           //获取仓库库存
           let inventoryTotalList = await getInventoryTotalAPI(codeList);
           let inventoryTotalList = await getInventoryTotalAPI(codeList);
-          this.form.datasource.filter((item) => item.productCode).forEach((item, index) => {
-            let find =
-              inventoryTotalList.find((key) => key.code == item.productCode) ||
-              {};
-            // item.availableCountBase = find.availableCountBase;
-            this.$set(
-              this.form.datasource[index],
-              'availableCountBase',
-              find.availableCountBase
-            );
-            supplierList.push(...item.supplierList);
-          });
+          this.form.datasource
+            .filter((item) => item.productCode)
+            .forEach((item, index) => {
+              let find =
+                inventoryTotalList.find(
+                  (key) => key.code == item.productCode
+                ) || {};
+              // item.availableCountBase = find.availableCountBase;
+              this.$set(
+                this.form.datasource[index],
+                'availableCountBase',
+                find.availableCountBase
+              );
+              supplierList.push(...item.supplierList);
+            });
           supplierIds = Array.from(
           supplierIds = Array.from(
             new Set(supplierList.map((item) => item.id))
             new Set(supplierList.map((item) => item.id))
           );
           );

+ 16 - 0
src/views/purchasingManage/purchaseNeedManage/components/detailDialog.vue

@@ -351,6 +351,22 @@
             label: '品牌',
             label: '品牌',
             slot: 'brand',
             slot: 'brand',
             align: 'center'
             align: 'center'
+          },
+              {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
+
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
+
           },
           },
           {
           {
             width: 150,
             width: 150,

+ 68 - 1
src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue

@@ -392,6 +392,36 @@
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
+      <template v-slot:modelKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'modelKey'">
+          <DictSelection
+            dictName="物品机型"
+            clearable
+            v-model="scope.row.modelKey"
+            :isOne="scope.$index === 0"
+            multiple
+            filterable
+            allow-create
+            default-first-option
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
+      <template v-slot:colorKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'colorKey'">
+          <DictSelection
+            dictName="物品颜色"
+            clearable
+            v-model="scope.row.colorKey"
+            :isOne="scope.$index === 0"
+            multiple
+            filterable
+            allow-create
+            default-first-option
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
       <!-- 操作列 -->
       <!-- 操作列 -->
       <template v-slot:action="scope">
       <template v-slot:action="scope">
         <el-popconfirm
         <el-popconfirm
@@ -638,6 +668,20 @@
             slot: 'specification',
             slot: 'specification',
             align: 'center'
             align: 'center'
           },
           },
+          {
+            width: 160,
+            prop: 'modelKey',
+            label: '机型',
+            slot: 'modelKey',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'colorKey',
+            label: '颜色',
+            slot: 'colorKey',
+            align: 'center'
+          },
           {
           {
             width: 120,
             width: 120,
             prop: 'imgCode',
             prop: 'imgCode',
@@ -716,6 +760,12 @@
         let comitDatasource = this.form.datasource;
         let comitDatasource = this.form.datasource;
         if (comitDatasource.length === 0) return [];
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach((v) => {
         comitDatasource.forEach((v) => {
+          if (v.modelKey) {
+            v.modelKey = v.modelKey.toString();
+          }
+          if (v.colorKey) {
+            v.colorKey = v.colorKey.toString();
+          }
           v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
           v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
           v.files = v.files || [];
           v.files = v.files || [];
           v.technicalDrawings = v.technicalDrawings || [];
           v.technicalDrawings = v.technicalDrawings || [];
@@ -727,6 +777,12 @@
       async putTableValue(data) {
       async putTableValue(data) {
         if (data && data?.length) {
         if (data && data?.length) {
           this.form.datasource = data.map((item, index) => {
           this.form.datasource = data.map((item, index) => {
+            if (item.modelKey) {
+              item.modelKey = item.modelKey.split(',');
+            }
+            if (item.colorKey) {
+              item.colorKey = item.colorKey.split(',');
+            }
             item.key = index + 1;
             item.key = index + 1;
             return item;
             return item;
           });
           });
@@ -845,6 +901,12 @@
           this.$set(parasm, 'supplierCode', item.supplierCode);
           this.$set(parasm, 'supplierCode', item.supplierCode);
           this.$set(parasm, 'supplierId', item.supplierId);
           this.$set(parasm, 'supplierId', item.supplierId);
           this.$set(parasm, 'supplierName', item.supplierName);
           this.$set(parasm, 'supplierName', item.supplierName);
+          if (item.modelKey) {
+            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+          }
+          if (item.colorKey) {
+            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+          }
           this.$set(
           this.$set(
             parasm,
             parasm,
             'packageDispositionList',
             'packageDispositionList',
@@ -930,7 +992,12 @@
           row.key = this.form.datasource.length + 1;
           row.key = this.form.datasource.length + 1;
           let parasm = idx == -1 ? row : this.form.datasource[i];
           let parasm = idx == -1 ? row : this.form.datasource[i];
           this.$set(parasm, 'productId', item.id);
           this.$set(parasm, 'productId', item.id);
-          // this.$set(parasm, 'id', item.id);
+          if (item.modelKey) {
+            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+          }
+          if (item.colorKey) {
+            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+          }
           this.$set(parasm, 'categoryName', item.name);
           this.$set(parasm, 'categoryName', item.name);
           this.$set(parasm, 'productCategoryId', item.categoryLevelId);
           this.$set(parasm, 'productCategoryId', item.categoryLevelId);
           this.$set(parasm, 'productBrand', item.brandNum);
           this.$set(parasm, 'productBrand', item.brandNum);

+ 16 - 9
src/views/purchasingManage/purchaseOrder/components/detailDialog.vue

@@ -12,7 +12,6 @@
     :resizable="true"
     :resizable="true"
     :modal="modal"
     :modal="modal"
     append-to-body
     append-to-body
-
   >
   >
     <div class="switch">
     <div class="switch">
       <div class="switch_left">
       <div class="switch_left">
@@ -637,8 +636,6 @@
             }
             }
           },
           },
 
 
-      
-       
           {
           {
             width: 120,
             width: 120,
             prop: 'singleWeight',
             prop: 'singleWeight',
@@ -755,12 +752,22 @@
                 : '';
                 : '';
             }
             }
           },
           },
-          // {
-          //   width: 120,
-          //   prop: 'deliveryDays',
-          //   label: '交期(天)',
-          //   slot: 'deliveryDays'
-          // },
+            {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
+
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
+
+          },
           {
           {
             width: 160,
             width: 160,
             prop: 'deliveryDeadline',
             prop: 'deliveryDeadline',

+ 75 - 27
src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue

@@ -260,33 +260,29 @@
             trigger: 'change'
             trigger: 'change'
           }"
           }"
         >
         >
-          <!-- <el-input
+          <el-input
             v-model="scope.row.singlePrice"
             v-model="scope.row.singlePrice"
             placeholder="请输入"
             placeholder="请输入"
             @input="changeCount(scope.row, scope.$index)"
             @input="changeCount(scope.row, scope.$index)"
           >
           >
             <template slot="append">元</template>
             <template slot="append">元</template>
-          </el-input> -->
-          <el-popover
-            placement="right"
-            width="600"
-            trigger="click"
-            @show="getPurchaseSinglePrice(scope.row)"
-          >
-            <el-table :data="purchaseSinglePriceData">
+          </el-input>
+          <!-- <el-popover placement="right" width="600" trigger="click">
+            <el-table >
               <el-table-column
               <el-table-column
                 width="300"
                 width="300"
-                property="supplierName"
+                property="date"
                 label="供应商"
                 label="供应商"
               ></el-table-column>
               ></el-table-column>
               <el-table-column
               <el-table-column
-                  width="160"
-                property="purchaseDate"
-                label="	采购日期"
+                width="150"
+                property="name"
+                label="最近采购价格"
               ></el-table-column>
               ></el-table-column>
               <el-table-column
               <el-table-column
-                property="singlePrice"
-                label="采购价格"
+                width="150"
+                property="address"
+                label="历史采购价格"
               ></el-table-column>
               ></el-table-column>
             </el-table>
             </el-table>
             <el-input
             <el-input
@@ -297,7 +293,7 @@
             >
             >
               <template slot="append">元</template>
               <template slot="append">元</template>
             </el-input>
             </el-input>
-          </el-popover>
+          </el-popover> -->
         </el-form-item>
         </el-form-item>
       </template>
       </template>
       <template v-slot:goodsPriceType="{ row, $index }">
       <template v-slot:goodsPriceType="{ row, $index }">
@@ -423,6 +419,36 @@
           </DictSelection>
           </DictSelection>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
+      <template v-slot:modelKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'modelKey'">
+          <DictSelection
+            dictName="物品机型"
+            clearable
+            v-model="scope.row.modelKey"
+            :isOne="scope.$index === 0"
+            multiple
+            filterable
+            allow-create
+            default-first-option
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
+      <template v-slot:colorKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'colorKey'">
+          <DictSelection
+            dictName="物品颜色"
+            clearable
+            v-model="scope.row.colorKey"
+            :isOne="scope.$index === 0"
+            multiple
+            filterable
+            allow-create
+            default-first-option
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
       <template v-slot:headerDeadline="{ column }">
       <template v-slot:headerDeadline="{ column }">
         <span class="is-required">{{ column.label }}</span>
         <span class="is-required">{{ column.label }}</span>
       </template>
       </template>
@@ -568,7 +594,7 @@
   import { levelList } from '@/enum/dict.js';
   import { levelList } from '@/enum/dict.js';
   import { getGoodsPriceByCondition } from '@/api/goodsManage/index';
   import { getGoodsPriceByCondition } from '@/api/goodsManage/index';
   import { changeCount, getAllPrice } from '@/BIZComponents/setProduct.js';
   import { changeCount, getAllPrice } from '@/BIZComponents/setProduct.js';
-  import { queryHistoricalUnitPrice } from '@/api/purchasingManage/purchaseOrder';
+
   const dayjs = require('dayjs');
   const dayjs = require('dayjs');
 
 
   export default {
   export default {
@@ -619,7 +645,6 @@
       };
       };
       return {
       return {
         levelList,
         levelList,
-        purchaseSinglePriceData: [],
         cacheKeyUrl: 'eos-purchasingManage-purchaseOrder-inventoryTable',
         cacheKeyUrl: 'eos-purchasingManage-purchaseOrder-inventoryTable',
         pricingWayList,
         pricingWayList,
         discountTotalPrice: 0.0,
         discountTotalPrice: 0.0,
@@ -924,7 +949,20 @@
             showOverflowTooltip: true,
             showOverflowTooltip: true,
             minWidth: 200
             minWidth: 200
           },
           },
-
+          {
+            width: 160,
+            prop: 'modelKey',
+            label: '机型',
+            slot: 'modelKey',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'colorKey',
+            label: '颜色',
+            slot: 'colorKey',
+            align: 'center'
+          },
           {
           {
             width: 160,
             width: 160,
             prop: 'deliveryDeadline',
             prop: 'deliveryDeadline',
@@ -1006,12 +1044,6 @@
         });
         });
       },
       },
 
 
-      async getPurchaseSinglePrice(row) {
-        this.purchaseSinglePriceData = [];
-        this.purchaseSinglePriceData = await queryHistoricalUnitPrice(
-          row.productId
-        );
-      },
       downloadFile(file) {
       downloadFile(file) {
         getFile({ objectName: file.storePath }, file.name);
         getFile({ objectName: file.storePath }, file.name);
       },
       },
@@ -1022,7 +1054,12 @@
         if (comitDatasource.length === 0) return [];
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach((v, i) => {
         comitDatasource.forEach((v, i) => {
           v.detailType = this.detailType;
           v.detailType = this.detailType;
-
+          if (v.modelKey) {
+            v.modelKey = v.modelKey.toString();
+          }
+          if (v.colorKey) {
+            v.colorKey = v.colorKey.toString();
+          }
           v.guaranteePeriodUnitName = this.getDictValue(
           v.guaranteePeriodUnitName = this.getDictValue(
             '质保期单位',
             '质保期单位',
             v.guaranteePeriodUnitCode
             v.guaranteePeriodUnitCode
@@ -1295,6 +1332,12 @@
             item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode
             item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode
               ? item.guaranteePeriodUnitCode + ''
               ? item.guaranteePeriodUnitCode + ''
               : '';
               : '';
+            if (item.modelKey) {
+              item.modelKey = item.modelKey.split(',');
+            }
+            if (item.colorKey) {
+              item.colorKey = item.colorKey.split(',');
+            }
           });
           });
           console.log(data, 'data');
           console.log(data, 'data');
           this.form.datasource = data;
           this.form.datasource = data;
@@ -1380,7 +1423,12 @@
           this.$set(parasm, 'pricingWay', item.pricingWay || 1);
           this.$set(parasm, 'pricingWay', item.pricingWay || 1);
           this.$set(parasm, 'goodsLevel', item.level);
           this.$set(parasm, 'goodsLevel', item.level);
           this.$set(parasm, 'taxRate', 13);
           this.$set(parasm, 'taxRate', 13);
-
+          if (item.modelKey) {
+            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+          }
+          if (item.colorKey) {
+            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+          }
           this.$set(
           this.$set(
             parasm,
             parasm,
             'packingSpecification',
             'packingSpecification',

+ 1 - 1
src/views/purchasingManage/purchaseOrder/index.vue

@@ -142,7 +142,7 @@
                   @click="handleCommand('outsourceSend', row)"
                   @click="handleCommand('outsourceSend', row)"
                   v-if="
                   v-if="
                     ['3', '4', '5', '6'].includes(row.sourceType) &&
                     ['3', '4', '5', '6'].includes(row.sourceType) &&
-                    [2].includes(row.orderStatus)
+                    [2].includes(row.orderStatus)&&row.progress<200
                   "
                   "
                 >
                 >
                   创建委外发货单
                   创建委外发货单

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

@@ -472,6 +472,20 @@
                   : '';
                   : '';
               }
               }
             },
             },
+            {
+              minWidth: 120,
+              prop: 'modelKey',
+              showOverflowTooltip: true,
+              label: '机型',
+              align: 'center'
+            },
+            {
+              minWidth: 120,
+              showOverflowTooltip: true,
+              prop: 'colorKey',
+              label: '颜色',
+              align: 'center'
+            },
             {
             {
               prop: 'productionDate',
               prop: 'productionDate',
               label: '生产日期',
               label: '生产日期',

+ 77 - 64
src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue

@@ -286,8 +286,40 @@
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
+      <template v-slot:modelKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'modelKey'">
+          <DictSelection
+            dictName="物品机型"
+            clearable
+            v-model="scope.row.modelKey"
+            :isOne="scope.$index === 0"
+            multiple
+            filterable
+            allow-create
+            default-first-option
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
+      <template v-slot:colorKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'colorKey'">
+          <DictSelection
+            dictName="物品颜色"
+            clearable
+            v-model="scope.row.colorKey"
+            :isOne="scope.$index === 0"
+            multiple
+            filterable
+            allow-create
+            default-first-option
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
       <template v-slot:isRequired="{ column }">
       <template v-slot:isRequired="{ column }">
-        <span :class="isBatchNo==1?'is-required':''">{{ column.label }}</span>
+        <span :class="isBatchNo == 1 ? 'is-required' : ''">{{
+          column.label
+        }}</span>
       </template>
       </template>
 
 
       <!-- 操作列 -->
       <!-- 操作列 -->
@@ -486,13 +518,20 @@
             slot: 'modelType',
             slot: 'modelType',
             align: 'center'
             align: 'center'
           },
           },
-          // {
-          //   width: 120,
-          //   prop: 'imgCode',
-          //   align: 'center',
-          //   label: '图号/件号',
-          //   showOverflowTooltip: true
-          // },
+          {
+            width: 160,
+            prop: 'modelKey',
+            label: '机型',
+            slot: 'modelKey',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'colorKey',
+            label: '颜色',
+            slot: 'colorKey',
+            align: 'center'
+          },
           {
           {
             width: 120,
             width: 120,
             prop: 'produceType',
             prop: 'produceType',
@@ -941,61 +980,7 @@
           }
           }
         });
         });
       },
       },
-      // //修改数量更新合计/总重
-      // changeNum(val, index, row) {
-      //   this.setWeight(index);
-      //   this.getTotalPrice(index);
-      // },
-      // setWeight(index) {
-      //   let data = this.form.datasource[index];
-      //   let totalCount = data.totalCount;
-      //   let singleWeight = data.singleWeight;
-      //   let sendTotalWeight = data.sendTotalWeight;
-      //   this.$set(
-      //     this.form.datasource[index],
-      //     'receiveTotalWeight',
-      //     totalCount * singleWeight || 0
-      //   );
-      //   this.$set(
-      //     this.form.datasource[index],
-      //     'increaseTotalWeight',
-      //     Number(this.form.datasource[index].receiveTotalWeight) -
-      //       Number(sendTotalWeight)
-      //   );
-      // },
-      // getTotalPrice(index) {
-      //   let data = this.form.datasource[index];
-      //   let singlePrice = data.singlePrice;
-      //   let discountSinglePrice = data.discountSinglePrice;
-      //   let totalCount = data.totalCount;
-      //   if (data['pricingWay'] == 2) {
-      //     let increaseTotalWeight = data.increaseTotalWeight;
-      //     this.$set(
-      //       this.form.datasource[index],
-      //       'totalPrice',
-      //       (Number(increaseTotalWeight) * Number(singlePrice)).toFixed(2)
-      //     );
-      //     this.$set(
-      //       this.form.datasource[index],
-      //       'discountTotalPrice',
-      //       (Number(discountSinglePrice) * Number(increaseTotalWeight)).toFixed(
-      //         2
-      //       )
-      //     );
-      //   }
-      //   if (this.form.datasource[index]['pricingWay'] == 1) {
-      //     this.$set(
-      //       this.form.datasource[index],
-      //       'totalPrice',
-      //       (Number(totalCount) * Number(singlePrice)).toFixed(2)
-      //     );
-      //     this.$set(
-      //       this.form.datasource[index],
-      //       'discountTotalPrice',
-      //       (Number(totalCount) * Number(discountSinglePrice)).toFixed(2)
-      //     );
-      //   }
-      // },
+
       //设置增重总重
       //设置增重总重
       setIcreaseTotalWeight(index) {
       setIcreaseTotalWeight(index) {
         let receiveTotalWeight = Number(
         let receiveTotalWeight = Number(
@@ -1013,6 +998,9 @@
       },
       },
       //选择产品回调
       //选择产品回调
       changeParent(obj, idx) {
       changeParent(obj, idx) {
+        if (this.form.datasource?.find((item) => item.id == obj.id)) {
+          return this.$message.error('选择的产品已经存在列表了');
+        }
         obj.orderTotalCount = obj.orderTotalCount || obj.totalCount;
         obj.orderTotalCount = obj.orderTotalCount || obj.totalCount;
         obj.id = '';
         obj.id = '';
         this.$set(
         this.$set(
@@ -1048,7 +1036,12 @@
           this.$set(parasm, 'sendTotalWeight', 0);
           this.$set(parasm, 'sendTotalWeight', 0);
           this.$set(parasm, 'increaseTotalWeight', 0);
           this.$set(parasm, 'increaseTotalWeight', 0);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
-
+          if (item.modelKey) {
+            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+          }
+          if (item.colorKey) {
+            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+          }
           this.$set(
           this.$set(
             parasm,
             parasm,
             'categoryRootLevelId',
             'categoryRootLevelId',
@@ -1113,6 +1106,12 @@
         let comitDatasource = this.form.datasource;
         let comitDatasource = this.form.datasource;
         if (comitDatasource.length === 0) return [];
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach(async (v) => {
         comitDatasource.forEach(async (v) => {
+          if (v.modelKey) {
+            v.modelKey = v.modelKey.toString();
+          }
+          if (v.colorKey) {
+            v.colorKey = v.colorKey.toString();
+          }
           if (v.guaranteePeriodUnitCode) {
           if (v.guaranteePeriodUnitCode) {
             v.guaranteePeriodUnitName = this.getDictValue(
             v.guaranteePeriodUnitName = this.getDictValue(
               '保质期单位',
               '保质期单位',
@@ -1181,6 +1180,20 @@
             };
             };
           });
           });
           this.form.datasource.forEach((item, index) => {
           this.form.datasource.forEach((item, index) => {
+            if (item.modelKey) {
+              this.$set(
+                this.form.datasource[index],
+                'modelKey',
+                item.modelKey?.split(',')
+              );
+            }
+            if (item.colorKey) {
+              this.$set(
+                this.form.datasource[index],
+                'colorKey',
+                item.colorKey?.split(',')
+              );
+            }
             if (!item.warehouseId) {
             if (!item.warehouseId) {
               this.warehouseChange(index, item);
               this.warehouseChange(index, item);
             }
             }

+ 17 - 5
src/views/purchasingManage/purchaseOrder/invoiceConfirm/components/addInvoiceDialog.vue

@@ -272,7 +272,7 @@
         loading: false,
         loading: false,
         // 是否是修改
         // 是否是修改
         isUpdate: false,
         isUpdate: false,
-        columnsVersion:1
+        columnsVersion: 1
       };
       };
     },
     },
     created() {
     created() {
@@ -281,7 +281,7 @@
     },
     },
     computed: {
     computed: {
       columns() {
       columns() {
-        let columnsVersion=this.columnsVersion
+        let columnsVersion = this.columnsVersion;
 
 
         return [
         return [
           {
           {
@@ -486,6 +486,20 @@
                 : '';
                 : '';
             }
             }
           },
           },
+          {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center'
+          },
           {
           {
             prop: 'productionDate',
             prop: 'productionDate',
             label: '生产日期',
             label: '生产日期',
@@ -688,9 +702,7 @@
         }
         }
       },
       },
       async sendSubmit(res) {
       async sendSubmit(res) {
-        const data = await getReceiveConfirmDetail(
-          this.businessId || res
-        );
+        const data = await getReceiveConfirmDetail(this.businessId || res);
         this.processSubmitDialogFlag = true;
         this.processSubmitDialogFlag = true;
 
 
         this.$nextTick(() => {
         this.$nextTick(() => {

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

@@ -436,13 +436,20 @@
                 : '';
                 : '';
             }
             }
           },
           },
-          // {
-          //   width: 120,
-          //   prop: 'deliveryDays',
-          //   label: '交期(天)',
-          //   slot: 'deliveryDays',
-          //   align: 'center'
-          // },
+          {
+            minWidth: 120,
+            prop: 'modelKey',
+            showOverflowTooltip: true,
+            label: '机型',
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            showOverflowTooltip: true,
+            prop: 'colorKey',
+            label: '颜色',
+            align: 'center'
+          },
           {
           {
             width: 200,
             width: 200,
             prop: 'guaranteePeriod',
             prop: 'guaranteePeriod',

+ 70 - 3
src/views/purchasingManage/purchaseOrder/outSourceSend/components/inventoryTable.vue

@@ -9,7 +9,6 @@
       :datasource="form.datasource"
       :datasource="form.datasource"
       class="time-form"
       class="time-form"
       max-height="350px"
       max-height="350px"
-
     >
     >
       <!-- 表头工具栏 -->
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
       <template v-slot:toolbar>
@@ -204,7 +203,36 @@
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
-
+      <template v-slot:modelKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'modelKey'">
+          <DictSelection
+            dictName="物品机型"
+            clearable
+            v-model="scope.row.modelKey"
+            :isOne="scope.$index === 0"
+            multiple
+            filterable
+            allow-create
+            default-first-option
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
+      <template v-slot:colorKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'colorKey'">
+          <DictSelection
+            dictName="物品颜色"
+            clearable
+            v-model="scope.row.colorKey"
+            :isOne="scope.$index === 0"
+            multiple
+            filterable
+            allow-create
+            default-first-option
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
       <!-- 操作列 -->
       <!-- 操作列 -->
       <template v-slot:action="scope">
       <template v-slot:action="scope">
         <el-popconfirm
         <el-popconfirm
@@ -562,6 +590,20 @@
                 : '';
                 : '';
             }
             }
           },
           },
+          {
+            width: 160,
+            prop: 'modelKey',
+            label: '机型',
+            slot: 'modelKey',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'colorKey',
+            label: '颜色',
+            slot: 'colorKey',
+            align: 'center'
+          },
           {
           {
             minWidth: 140,
             minWidth: 140,
             prop: 'customerExpectDeliveryDeadline',
             prop: 'customerExpectDeliveryDeadline',
@@ -832,7 +874,12 @@
           this.$set(parasm, 'singlePrice', 0);
           this.$set(parasm, 'singlePrice', 0);
           this.$set(parasm, 'discountSinglePrice', 0);
           this.$set(parasm, 'discountSinglePrice', 0);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
-
+          if (item.modelKey) {
+            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+          }
+          if (item.colorKey) {
+            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+          }
           this.$set(
           this.$set(
             parasm,
             parasm,
             'warehouseList',
             'warehouseList',
@@ -900,6 +947,12 @@
         let comitDatasource = this.form.datasource;
         let comitDatasource = this.form.datasource;
         if (comitDatasource.length === 0) return [];
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach(async (v) => {
         comitDatasource.forEach(async (v) => {
+          if (v.modelKey) {
+            v.modelKey = v.modelKey.toString();
+          }
+          if (v.colorKey) {
+            v.colorKey = v.colorKey.toString();
+          }
           v.totalCount = Number(v.totalCount);
           v.totalCount = Number(v.totalCount);
           v.technicalDrawings = Array.isArray(v.technicalDrawings)
           v.technicalDrawings = Array.isArray(v.technicalDrawings)
             ? v.technicalDrawings
             ? v.technicalDrawings
@@ -922,6 +975,20 @@
         if (data) {
         if (data) {
           this.form.datasource = data;
           this.form.datasource = data;
           data.forEach(async (item, index) => {
           data.forEach(async (item, index) => {
+            if (item.modelKey) {
+              this.$set(
+                this.form.datasource[index],
+                'modelKey',
+                item.modelKey?.split(',')
+              );
+            }
+            if (item.colorKey) {
+              this.$set(
+                this.form.datasource[index],
+                'colorKey',
+                item.colorKey?.split(',')
+              );
+            }
             this.$set(
             this.$set(
               this.form.datasource[index],
               this.form.datasource[index],
               'warehouseList',
               'warehouseList',

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

@@ -421,6 +421,22 @@
                     .join(',')
                     .join(',')
                 : '';
                 : '';
             }
             }
+          },
+                    {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
+
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
+
           },
           },
           {
           {
             width: 200,
             width: 200,

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

@@ -9,7 +9,6 @@
       :datasource="form.datasource"
       :datasource="form.datasource"
       class="time-form"
       class="time-form"
       max-height="350px"
       max-height="350px"
-
     >
     >
       <!-- 表头工具栏 -->
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
       <template v-slot:toolbar>
@@ -541,6 +540,20 @@
                 : '';
                 : '';
             }
             }
           },
           },
+          {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center'
+          },
           {
           {
             width: 200,
             width: 200,
             prop: 'returnReason',
             prop: 'returnReason',

+ 16 - 6
src/views/purchasingManage/purchasePlanManage/components/detailDialog.vue

@@ -516,12 +516,22 @@
             slot: 'specification',
             slot: 'specification',
             align: 'center'
             align: 'center'
           },
           },
-          // {
-          //   width: 130,
-          //   prop: 'modelType',
-          //   label: '品牌',
-          //   slot: 'modelType'
-          // },
+           {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
+
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
+
+          },
 
 
           {
           {
             width: 150,
             width: 150,

+ 68 - 1
src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue

@@ -447,6 +447,36 @@
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
+      <template v-slot:modelKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'modelKey'">
+          <DictSelection
+            dictName="物品机型"
+            clearable
+            v-model="scope.row.modelKey"
+            :isOne="scope.$index === 0"
+            multiple
+            filterable
+            allow-create
+            default-first-option
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
+      <template v-slot:colorKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'colorKey'">
+          <DictSelection
+            dictName="物品颜色"
+            clearable
+            v-model="scope.row.colorKey"
+            :isOne="scope.$index === 0"
+            multiple
+            filterable
+            allow-create
+            default-first-option
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
       <!-- 操作列 -->
       <!-- 操作列 -->
       <template v-slot:action="scope">
       <template v-slot:action="scope">
         <el-popconfirm
         <el-popconfirm
@@ -756,6 +786,20 @@
             slot: 'specification',
             slot: 'specification',
             align: 'center'
             align: 'center'
           },
           },
+          {
+            width: 160,
+            prop: 'modelKey',
+            label: '机型',
+            slot: 'modelKey',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'colorKey',
+            label: '颜色',
+            slot: 'colorKey',
+            align: 'center'
+          },
           {
           {
             width: 120,
             width: 120,
             prop: 'imgCode',
             prop: 'imgCode',
@@ -842,6 +886,12 @@
         let comitDatasource = this.form.datasource;
         let comitDatasource = this.form.datasource;
         if (comitDatasource.length === 0) return [];
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach((v) => {
         comitDatasource.forEach((v) => {
+          if (v.modelKey) {
+            v.modelKey = v.modelKey.toString();
+          }
+          if (v.colorKey) {
+            v.colorKey = v.colorKey.toString();
+          }
           v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
           v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
           v.files = v.files || [];
           v.files = v.files || [];
           v.technicalDrawings = v.technicalDrawings || [];
           v.technicalDrawings = v.technicalDrawings || [];
@@ -887,6 +937,12 @@
         if (data && data?.length) {
         if (data && data?.length) {
           this.form.datasource = [];
           this.form.datasource = [];
           data.forEach((row) => {
           data.forEach((row) => {
+            if (row.modelKey) {
+              row.modelKey = row.modelKey.split(',');
+            }
+            if (row.colorKey) {
+              row.colorKey = row.colorKey.split(',');
+            }
             row['reqTotalCount'] = row['reqTotalCount'] || row.totalCount;
             row['reqTotalCount'] = row['reqTotalCount'] || row.totalCount;
             row['arrivalWay'] = row.arrivalWay || 1;
             row['arrivalWay'] = row.arrivalWay || 1;
             let item = JSON.parse(JSON.stringify(row));
             let item = JSON.parse(JSON.stringify(row));
@@ -1078,7 +1134,12 @@
           this.$set(parasm, 'supplierCode', item.supplierCode);
           this.$set(parasm, 'supplierCode', item.supplierCode);
           this.$set(parasm, 'supplierId', item.supplierId);
           this.$set(parasm, 'supplierId', item.supplierId);
           this.$set(parasm, 'supplierName', item.supplierName);
           this.$set(parasm, 'supplierName', item.supplierName);
-
+          if (item.modelKey) {
+            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+          }
+          if (item.colorKey) {
+            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+          }
           this.$set(
           this.$set(
             parasm,
             parasm,
             'packingSpecification',
             'packingSpecification',
@@ -1152,6 +1213,12 @@
           this.$set(parasm, 'imgCode', item.imgCode);
           this.$set(parasm, 'imgCode', item.imgCode);
           this.$set(parasm, 'produceType', item.componentAttribute);
           this.$set(parasm, 'produceType', item.componentAttribute);
           this.$set(parasm, 'approvalNumber', item.extField.approvalNumber);
           this.$set(parasm, 'approvalNumber', item.extField.approvalNumber);
+          if (item.modelKey) {
+            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+          }
+          if (item.colorKey) {
+            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+          }
           this.$set(
           this.$set(
             parasm,
             parasm,
             'packingSpecification',
             'packingSpecification',

+ 19 - 0
src/views/saleManage/saleOrder/entrustedReceive/components/detailDialog.vue

@@ -206,6 +206,22 @@
             label: '规格',
             label: '规格',
             slot: 'specification',
             slot: 'specification',
             align: 'center'
             align: 'center'
+          },
+           {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
+
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
+
           },
           },
           {
           {
             width: 200,
             width: 200,
@@ -396,6 +412,9 @@
           }
           }
         ]
         ]
       };
       };
+    },
+    created() {
+   
     },
     },
     methods: {
     methods: {
       async open(row) {
       async open(row) {

+ 64 - 2
src/views/saleManage/saleOrder/entrustedReceive/components/inventoryTable.vue

@@ -148,6 +148,7 @@
             v-model="scope.row.produceDeliveryDeadline"
             v-model="scope.row.produceDeliveryDeadline"
             type="date"
             type="date"
             placeholder="选择日期"
             placeholder="选择日期"
+            value-format="yyyy-MM-dd"
           >
           >
           </el-date-picker>
           </el-date-picker>
         </el-form-item>
         </el-form-item>
@@ -163,10 +164,41 @@
             v-model="scope.row.customerExpectDeliveryDeadline"
             v-model="scope.row.customerExpectDeliveryDeadline"
             type="date"
             type="date"
             placeholder="选择日期"
             placeholder="选择日期"
+            value-format="yyyy-MM-dd"
           >
           >
           </el-date-picker>
           </el-date-picker>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
+      <template v-slot:modelKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'modelKey'">
+          <DictSelection
+            dictName="物品机型"
+            clearable
+            v-model="scope.row.modelKey"
+            :isOne="scope.$index === 0"
+            filterable
+            allow-create
+            default-first-option
+            multiple
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
+      <template v-slot:colorKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'colorKey'">
+          <DictSelection
+            dictName="物品颜色"
+            clearable
+            v-model="scope.row.colorKey"
+            :isOne="scope.$index === 0"
+            multiple
+            filterable
+            allow-create
+            default-first-option
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
       <template v-slot:warehouseNum="scope">
       <template v-slot:warehouseNum="scope">
         <el-form-item style="margin-bottom: 20px">
         <el-form-item style="margin-bottom: 20px">
           {{ scope.row.warehouseNum }}
           {{ scope.row.warehouseNum }}
@@ -328,6 +360,20 @@
             slot: 'specification',
             slot: 'specification',
             align: 'center'
             align: 'center'
           },
           },
+          {
+            width: 160,
+            prop: 'modelKey',
+            label: '机型',
+            slot: 'modelKey',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'colorKey',
+            label: '颜色',
+            slot: 'colorKey',
+            align: 'center'
+          },
           {
           {
             minWidth: 150,
             minWidth: 150,
             prop: 'customerMark',
             prop: 'customerMark',
@@ -667,6 +713,12 @@
         if (comitDatasource.length === 0) return [];
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach(async (v) => {
         comitDatasource.forEach(async (v) => {
           v.totalCount = Number(v.totalCount);
           v.totalCount = Number(v.totalCount);
+          if (v.modelKey) {
+            v.modelKey = v.modelKey.toString();
+          }
+          if (v.colorKey) {
+            v.colorKey = v.colorKey.toString();
+          }
           // item['pricingWay'] = item.pricingWay || this.pricingWay;
           // item['pricingWay'] = item.pricingWay || this.pricingWay;
           v.technicalDrawings = Array.isArray(v.technicalDrawings)
           v.technicalDrawings = Array.isArray(v.technicalDrawings)
             ? v.technicalDrawings
             ? v.technicalDrawings
@@ -693,7 +745,12 @@
             if (!item.warehouseId) {
             if (!item.warehouseId) {
               this.warehouseChange(index, item);
               this.warehouseChange(index, item);
             }
             }
-
+            if (item.modelKey) {
+              item.modelKey = item.modelKey.split(',');
+            }
+            if (item.colorKey) {
+              item.colorKey = item.colorKey.split(',');
+            }
             //发货数量因已发货数量被修改需要重新计算金额,总重
             //发货数量因已发货数量被修改需要重新计算金额,总重
             this.changeNum(item.totalCount, item, index);
             this.changeNum(item.totalCount, item, index);
           });
           });
@@ -740,7 +797,12 @@
           this.$set(parasm, 'pricingWay', 1);
           this.$set(parasm, 'pricingWay', 1);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
           this.$set(parasm, 'batchNo', await getCode('lot_number_code'));
           this.$set(parasm, 'batchNo', await getCode('lot_number_code'));
-
+          if (item.modelKey) {
+            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+          }
+          if (item.colorKey) {
+            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+          }
           this.$set(parasm, 'discountSinglePrice', 0);
           this.$set(parasm, 'discountSinglePrice', 0);
           this.$set(parasm, 'singlePrice', 0);
           this.$set(parasm, 'singlePrice', 0);
 
 

+ 21 - 46
src/views/saleManage/saleOrder/exceptionManagement/components/addOrEditDialog.vue

@@ -103,7 +103,6 @@
         :datasource="form.detailList"
         :datasource="form.detailList"
         row-key="id"
         row-key="id"
         :maxHeight="400"
         :maxHeight="400"
-
       >
       >
         <template v-slot:headerExceptionDispose="{ column }">
         <template v-slot:headerExceptionDispose="{ column }">
           <span class="is-required">{{ column.label }}</span>
           <span class="is-required">{{ column.label }}</span>
@@ -239,6 +238,9 @@
       relationType: {
       relationType: {
         default: 1
         default: 1
       }
       }
+    },
+    created() {
+
     },
     },
     data() {
     data() {
       return {
       return {
@@ -407,49 +409,22 @@
             showOverflowTooltip: true,
             showOverflowTooltip: true,
             align: 'center'
             align: 'center'
           },
           },
-          // {
-          //   width: 160,
-          //   prop: 'pricingWay',
-          //   label: '计价方式',
-          //   slot: 'pricingWay',
-          //   align: 'center',
-          //   formatter: (row, column) => {
-          //     return row.pricingWay == 1
-          //       ? '按数量计费'
-          //       : row.pricingWay == 2
-          //       ? '按重量计费'
-          //       : '';
-          //   }
-          // },
-          // {
-          //   width: 100,
-          //   prop: 'singlePrice',
-          //   label: '单价',
-          //   slot: 'singlePrice',
-          //   align: 'center'
-          // },
+          {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
 
 
-          // {
-          //   width: 100,
-          //   prop: 'totalPrice',
-          //   label: '合计',
-          //   align: 'center'
-          // },
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
 
 
-          // {
-          //   minWidth: 80,
-          //   prop: 'receiveTotalWeight',
-          //   label: '重量',
-          //   showOverflowTooltip: true,
-          //   align: 'center'
-          // },
-          // {
-          //   minWidth: 100,
-          //   prop: 'weightUnit',
-          //   label: '重量单位',
-          //   showOverflowTooltip: true,
-          //   align: 'center'
-          // },
+          },
 
 
           {
           {
             width: 220,
             width: 220,
@@ -519,10 +494,10 @@
           const res = await getReceiveConfirmDetail(data.id);
           const res = await getReceiveConfirmDetail(data.id);
           this.form.relationCode = res.receiveConfirmNo;
           this.form.relationCode = res.receiveConfirmNo;
           this.form.relationId = res.id;
           this.form.relationId = res.id;
-          res.productList= res.productList.map(item=>{
-             item['clientCode']=item.supplierMark
-          })
-          
+          res.productList = res.productList.map((item) => {
+            item['clientCode'] = item.supplierMark;
+          });
+
           this.form.relationName =
           this.form.relationName =
             res.supplierName + '-' + res.receiveConfirmNo;
             res.supplierName + '-' + res.receiveConfirmNo;
           this.$set(this.form, 'detailList', res.productList);
           this.$set(this.form, 'detailList', res.productList);

+ 77 - 14
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -333,6 +333,36 @@
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
+      <template v-slot:modelKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'modelKey'">
+          <DictSelection
+            dictName="物品机型"
+            clearable
+            v-model="scope.row.modelKey"
+            :isOne="scope.$index === 0"
+            filterable
+            allow-create
+            default-first-option
+            multiple
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
+      <template v-slot:colorKey="scope">
+        <el-form-item :prop="'datasource.' + scope.$index + '.' + 'colorKey'">
+          <DictSelection
+            dictName="物品颜色"
+            clearable
+            v-model="scope.row.colorKey"
+            :isOne="scope.$index === 0"
+            filterable
+            allow-create
+            default-first-option
+            multiple
+          >
+          </DictSelection>
+        </el-form-item>
+      </template>
       <!-- 操作列 -->
       <!-- 操作列 -->
       <template v-slot:action="scope">
       <template v-slot:action="scope">
         <el-popconfirm
         <el-popconfirm
@@ -394,7 +424,6 @@
   import dictMixins from '@/mixins/dictMixins';
   import dictMixins from '@/mixins/dictMixins';
   import productList from './product-list.vue';
   import productList from './product-list.vue';
   import {
   import {
-    getWarehouseList,
     getWarehouseOutStock,
     getWarehouseOutStock,
     getIdWarehouseList
     getIdWarehouseList
   } from '@/api/saleManage/saleorder';
   } from '@/api/saleManage/saleorder';
@@ -593,6 +622,20 @@
             slot: 'specification',
             slot: 'specification',
             align: 'center'
             align: 'center'
           },
           },
+          {
+            width: 160,
+            prop: 'modelKey',
+            label: '机型',
+            slot: 'modelKey',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'colorKey',
+            label: '颜色',
+            slot: 'colorKey',
+            align: 'center'
+          },
           {
           {
             minWidth: 160,
             minWidth: 160,
             prop: 'productionCodes',
             prop: 'productionCodes',
@@ -696,7 +739,7 @@
                 prop: 'blockCount',
                 prop: 'blockCount',
                 label: '发货块数',
                 label: '发货块数',
                 slot: 'blockCount',
                 slot: 'blockCount',
-                align: 'center',
+                align: 'center'
               }
               }
             : { width: 1 },
             : { width: 1 },
 
 
@@ -1016,7 +1059,7 @@
         );
         );
       },
       },
       //改变数量
       //改变数量
-      changeCount(row, index,isBlockCount) {
+      changeCount(row, index, isBlockCount) {
         this.$set(
         this.$set(
           this.form,
           this.form,
           'datasource[' + index + ']',
           'datasource[' + index + ']',
@@ -1034,7 +1077,7 @@
         this.changeSendTotalWeight(row, index);
         this.changeSendTotalWeight(row, index);
         this.getNotaxSinglePrice();
         this.getNotaxSinglePrice();
         this.$forceUpdate();
         this.$forceUpdate();
-        if (this.clientEnvironmentId == 4&&!isBlockCount) {
+        if (this.clientEnvironmentId == 4 && !isBlockCount) {
           this.tableHandleKeyUp(row, index, 'sum');
           this.tableHandleKeyUp(row, index, 'sum');
         }
         }
       },
       },
@@ -1147,7 +1190,7 @@
               (Number(row.blockCount) * modelLong * modeWide * modeHight) /
               (Number(row.blockCount) * modelLong * modeWide * modeHight) /
               1000000;
               1000000;
             row.saleCount = row.totalCount;
             row.saleCount = row.totalCount;
-            this.changeCount(row, index,true);
+            this.changeCount(row, index, true);
           }
           }
         }
         }
       },
       },
@@ -1155,6 +1198,9 @@
       //选择产品回调
       //选择产品回调
       async changeParent(obj, idx) {
       async changeParent(obj, idx) {
         obj.orderTotalCount = obj.totalCount;
         obj.orderTotalCount = obj.totalCount;
+        if (this.form.datasource?.find((item) => item.id == obj.id)) {
+          return this.$message.error('选择的产品已经存在列表了');
+        }
         obj.id = '';
         obj.id = '';
         obj['tempId'] = idx;
         obj['tempId'] = idx;
         this.$set(
         this.$set(
@@ -1191,7 +1237,12 @@
           this.$set(parasm, 'singlePrice', 0);
           this.$set(parasm, 'singlePrice', 0);
           this.$set(parasm, 'discountSinglePrice', 0);
           this.$set(parasm, 'discountSinglePrice', 0);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
-
+          if (item.modelKey) {
+            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+          }
+          if (item.colorKey) {
+            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+          }
           this.$set(parasm, 'receiveTotalWeight', 0);
           this.$set(parasm, 'receiveTotalWeight', 0);
           this.$set(parasm, 'sendTotalWeight', 0);
           this.$set(parasm, 'sendTotalWeight', 0);
           this.$set(parasm, 'increaseTotalWeight', 0);
           this.$set(parasm, 'increaseTotalWeight', 0);
@@ -1256,6 +1307,12 @@
         let comitDatasource = this.form.datasource;
         let comitDatasource = this.form.datasource;
         if (comitDatasource.length === 0) return [];
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach(async (v) => {
         comitDatasource.forEach(async (v) => {
+          if (v.modelKey) {
+            v.modelKey = v.modelKey.toString();
+          }
+          if (v.colorKey) {
+            v.colorKey = v.colorKey.toString();
+          }
           v.totalCount = Number(v.totalCount);
           v.totalCount = Number(v.totalCount);
           v.technicalDrawings = Array.isArray(v.technicalDrawings)
           v.technicalDrawings = Array.isArray(v.technicalDrawings)
             ? v.technicalDrawings
             ? v.technicalDrawings
@@ -1274,17 +1331,23 @@
 
 
       //修改回显
       //修改回显
       putTableValue(data) {
       putTableValue(data) {
-        console.log(data, 'data 1+1');
         if (data) {
         if (data) {
           this.form.datasource = data;
           this.form.datasource = data;
           this.form.datasource.forEach(async (item, index) => {
           this.form.datasource.forEach(async (item, index) => {
-            // if (!item.extField) {
-            //   this.$set(
-            //     this.form.datasource[index],
-            //     'extField',
-            //     item.extField || {}
-            //   );
-            // }
+            if (item.modelKey) {
+              this.$set(
+                this.form.datasource[index],
+                'modelKey',
+                item.modelKey.split(',')
+              );
+            }
+            if (item.colorKey) {
+              this.$set(
+                this.form.datasource[index],
+                'colorKey',
+                item.colorKey.split(',')
+              );
+            }
             this.$set(
             this.$set(
               this.form.datasource[index],
               this.form.datasource[index],
               'warehouseList',
               'warehouseList',

+ 22 - 8
src/views/saleManage/saleOrder/invoice/components/inventoryTableDetails.vue

@@ -8,7 +8,6 @@
     @columns-change="handleColumnChange"
     @columns-change="handleColumnChange"
     :cache-key="cacheKeyUrl"
     :cache-key="cacheKeyUrl"
     :maxHeight="350"
     :maxHeight="350"
-
   >
   >
     <template v-slot:technicalDrawings="{ row }">
     <template v-slot:technicalDrawings="{ row }">
       <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
       <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
@@ -38,7 +37,7 @@
   import { levelList } from '@/enum/dict.js';
   import { levelList } from '@/enum/dict.js';
 
 
   export default {
   export default {
-    mixins: [dictMixins, tabMixins,getDynamicsColumns],
+    mixins: [dictMixins, tabMixins, getDynamicsColumns],
 
 
     components: {
     components: {
       // fileMain
       // fileMain
@@ -49,7 +48,7 @@
         form: {
         form: {
           datasource: []
           datasource: []
         },
         },
-        columnsVersion:1
+        columnsVersion: 1
       };
       };
     },
     },
     created() {
     created() {
@@ -57,9 +56,8 @@
       this.requestDict('生产类型');
       this.requestDict('生产类型');
     },
     },
     computed: {
     computed: {
-
       columns() {
       columns() {
-        let columnsVersion=this.columnsVersion
+        let columnsVersion = this.columnsVersion;
         return [
         return [
           {
           {
             width: 45,
             width: 45,
@@ -74,7 +72,6 @@
             label: '订单编码',
             label: '订单编码',
             align: 'center',
             align: 'center',
             fixed: 'left'
             fixed: 'left'
-
           },
           },
           {
           {
             width: 200,
             width: 200,
@@ -125,6 +122,22 @@
             slot: 'specification',
             slot: 'specification',
             align: 'center'
             align: 'center'
           },
           },
+          {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
+
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
+
+          },
           {
           {
             minWidth: 160,
             minWidth: 160,
             prop: 'productionCodes',
             prop: 'productionCodes',
@@ -159,7 +172,8 @@
             prop: 'goodsLevel',
             prop: 'goodsLevel',
             label: '物品级别',
             label: '物品级别',
             formatter: (_row, _column, cellValue) => {
             formatter: (_row, _column, cellValue) => {
-              return levelList.find(item=>item.value==_row.goodsLevel)?.label
+              return levelList.find((item) => item.value == _row.goodsLevel)
+                ?.label;
             },
             },
             align: 'center'
             align: 'center'
           },
           },
@@ -405,7 +419,7 @@
     methods: {
     methods: {
       //修改回显
       //修改回显
       putTableValue(data) {
       putTableValue(data) {
-        console.log(data,'data')
+        console.log(data, 'data');
         if (data) {
         if (data) {
           this.form.datasource = data;
           this.form.datasource = data;
         }
         }

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

@@ -487,7 +487,22 @@
             label: '合计',
             label: '合计',
             align: 'center'
             align: 'center'
           },
           },
+          {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
 
 
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
+
+          },
           {
           {
             minWidth: 80,
             minWidth: 80,
             prop: 'sendTotalWeight',
             prop: 'sendTotalWeight',
@@ -745,6 +760,8 @@
               item['goodsPriceType'] = val.goodsPriceType;
               item['goodsPriceType'] = val.goodsPriceType;
               item['clientCode'] = item.clientCode || val.customerMark;
               item['clientCode'] = item.clientCode || val.customerMark;
               item['pricingWay'] = val.pricingWay || 1;
               item['pricingWay'] = val.pricingWay || 1;
+              item['modelKey'] = val.modelKey;
+              item['colorKey'] = val.colorKey;
 
 
               item.totalPrice = item.singlePrice * item.measureQuantity;
               item.totalPrice = item.singlePrice * item.measureQuantity;
             }
             }

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

@@ -444,7 +444,22 @@
             label: '合计',
             label: '合计',
             align: 'center'
             align: 'center'
           },
           },
+          {
+            minWidth: 120,
+            prop: 'modelKey',
+            label: '机型',
+            showOverflowTooltip: true,
+            align: 'center',
 
 
+          },
+          {
+            minWidth: 120,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            align: 'center',
+
+          },
           {
           {
             minWidth: 80,
             minWidth: 80,
             prop: 'receiveTotalWeight',
             prop: 'receiveTotalWeight',

+ 1 - 1
vue.config.js

@@ -36,7 +36,7 @@ module.exports = {
     proxy: {
     proxy: {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
       '/api': {
-        target: 'http://192.168.1.251:18086',//开发
+        target: 'http://192.168.1.144:18086',//开发
         // target: 'http://192.168.1.251:18186',//测试
         // target: 'http://192.168.1.251:18186',//测试
         // target: 'http://192.168.1.23:18086',//罗
         // target: 'http://192.168.1.23:18086',//罗
         // target: 'http://192.168.1.144:18086',//付
         // target: 'http://192.168.1.144:18086',//付