cz 1 жил өмнө
parent
commit
9c748354a1
46 өөрчлөгдсөн 2547 нэмэгдсэн , 454 устгасан
  1. 1 1
      src/components/process/EHSD/Contract.vue
  2. 2 2
      src/components/process/EHSD/ContractChange.vue
  3. 2 2
      src/components/process/EHSD/PriceSheet.vue
  4. 2 2
      src/components/process/EHSD/Sample.vue
  5. 2 2
      src/components/process/EHSD/SampleChange.vue
  6. 1 1
      src/components/process/SF/AfterSales.vue
  7. 403 85
      src/components/process/SF/Contract.vue
  8. 2 2
      src/components/process/SF/ContractChange.vue
  9. 2 2
      src/components/process/SF/PriceSheet.vue
  10. 239 50
      src/components/process/SF/Purchase.vue
  11. 1 1
      src/components/process/SF/PurchaseChange.vue
  12. 1 1
      src/components/process/SF/ReturnGood.vue
  13. 424 31
      src/components/process/SF/Subscribe.vue
  14. 1 1
      src/components/product/SelectCompanyProduct.vue
  15. 1 1
      src/components/product/SelectProduct.vue
  16. 12 2
      src/components/product/treeList.vue
  17. 3 3
      src/views/EHSD/procurement/purchasedEHSD/index.vue
  18. 88 10
      src/views/EHSD/productLibrary/companyProduct/index.vue
  19. 68 13
      src/views/EHSD/productLibrary/waitCreateProduct/index.vue
  20. 2 2
      src/views/EHSD/saleContract/PriceSheetDetail.vue
  21. 14 0
      src/views/EHSD/saleContract/contractEHSD/index.vue
  22. 2 2
      src/views/EHSD/saleContract/priceSheetEHSD/index.vue
  23. 3 3
      src/views/EHSD/saleContract/priceSheetEstimate/index.vue
  24. 2 2
      src/views/EHSD/saleContract/priceSheetForeign/index.vue
  25. 5 5
      src/views/MES/processScheduling/index.vue
  26. 2 2
      src/views/MES/productionOrder/index.vue
  27. 535 118
      src/views/MES/productionTask/index.vue
  28. 3 3
      src/views/MES/productionTask/selectProductionTask.vue
  29. 1 1
      src/views/MES/reportDetail/index.vue
  30. 2 2
      src/views/index.vue
  31. 1 1
      src/views/monitor/online/index.vue
  32. 1 1
      src/views/oa/mailList/interior/index.vue
  33. 41 8
      src/views/process/processApproval/index.vue
  34. 13 1
      src/views/process/processConfig/vueFlow.vue
  35. 70 8
      src/views/product/material/index.vue
  36. 2 1
      src/views/purchaseManage/purchaseManage/purchase/index.vue
  37. 330 24
      src/views/purchaseManage/supplier/supplier/index.vue
  38. 57 10
      src/views/purchaseManage/supplier/supplyPrice/index.vue
  39. 1 1
      src/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index.vue
  40. 1 1
      src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue
  41. 1 1
      src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue
  42. 81 15
      src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue
  43. 118 26
      src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue
  44. 1 1
      src/views/salesMange/afterSales/SelectContractProduct.vue
  45. 2 2
      src/views/salesMange/afterSales/index.vue
  46. 1 1
      src/views/system/user/profile/index.vue

+ 1 - 1
src/components/process/EHSD/Contract.vue

@@ -137,7 +137,7 @@
             </el-table-column>
             <el-table-column prop="productName" label="商品名称" min-width="130" />
             <el-table-column prop="productCode" label="商品编码" width="130" />
-            <el-table-column label="尺寸 cm*cm*cm" width="140">
+            <el-table-column label="规格尺寸 (cm)" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   {{row['length']}}*{{row.width}}*{{row.height}}

+ 2 - 2
src/components/process/EHSD/ContractChange.vue

@@ -277,7 +277,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="尺寸 cm*cm*cm" width="140">
+            <el-table-column label="规格尺寸 (cm)" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'contractProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true"
@@ -839,7 +839,7 @@ const rules = ref({
   ],
   productName: [{ required: true, message: "请输入商品名称", trigger: "blur" }],
   productModel: [
-    { required: true, message: "请输入尺寸 cm*cm*cm", trigger: "blur" },
+    { required: true, message: "请输入规格尺寸 (cm)", trigger: "blur" },
   ],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],

+ 2 - 2
src/components/process/EHSD/PriceSheet.vue

@@ -214,7 +214,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="尺寸 cm*cm*cm" width="140">
+            <el-table-column label="规格尺寸 (cm)" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'quotationProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true"
@@ -487,7 +487,7 @@ const rules = ref({
   ],
   productName: [{ required: true, message: "请输入商品名称", trigger: "blur" }],
   productModel: [
-    { required: true, message: "请输入尺寸 cm*cm*cm", trigger: "blur" },
+    { required: true, message: "请输入规格尺寸 (cm)", trigger: "blur" },
   ],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],

+ 2 - 2
src/components/process/EHSD/Sample.vue

@@ -281,7 +281,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="尺寸 cm*cm*cm" width="140">
+            <el-table-column label="规格尺寸 (cm)" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'sampleProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true"
@@ -732,7 +732,7 @@ const rules = ref({
   ],
   productName: [{ required: true, message: "请输入商品名称", trigger: "blur" }],
   productModel: [
-    { required: true, message: "请输入尺寸 cm*cm*cm", trigger: "blur" },
+    { required: true, message: "请输入规格尺寸 (cm)", trigger: "blur" },
   ],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],

+ 2 - 2
src/components/process/EHSD/SampleChange.vue

@@ -274,7 +274,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="尺寸 cm*cm*cm" width="140">
+            <el-table-column label="规格尺寸 (cm)" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'sampleProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true"
@@ -726,7 +726,7 @@ const rules = ref({
   ],
   productName: [{ required: true, message: "请输入商品名称", trigger: "blur" }],
   productModel: [
-    { required: true, message: "请输入尺寸 cm*cm*cm", trigger: "blur" },
+    { required: true, message: "请输入规格尺寸 (cm)", trigger: "blur" },
   ],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],

+ 1 - 1
src/components/process/SF/AfterSales.vue

@@ -116,7 +116,7 @@ const formConfig = computed(() => {
       type: "input",
       itemType: "text",
       prop: "size",
-      label: "尺寸 (cm)",
+      label: "规格尺寸 (cm)",
       itemWidth: 50,
       disabled: true,
     },

+ 403 - 85
src/components/process/SF/Contract.vue

@@ -5,7 +5,7 @@
         <div>
           <el-button type="primary" v-if="
               [30].includes(route.query.processType) || !route.query.processType
-            " @click="clickCopy(1)">复制合同</el-button>
+            " @click="clickCopy(1)">复制订单</el-button>
         </div>
       </template>
 
@@ -24,8 +24,8 @@
               <el-col :span="12">
                 <el-form-item prop="deptId" label="" label-width="0px" class="margin-b-0 wid100">
                   <el-tree-select v-model="formData.data.deptId" :data="deptData" style="width: 100%" placeholder="部门" default-expand-all
-                                  :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }"
-                                  :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" />
+                                  :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }" />
+                  <!-- :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" -->
                 </el-form-item>
               </el-col>
 
@@ -152,6 +152,29 @@
         </div>
       </template>
 
+      <template #advanceRatio>
+        <el-row style="width: 100%">
+          <el-col :span="6" style="padding-right:8px">
+            <el-form-item label="定⾦⽐例" prop="advanceRatio" class="margin-b-0 wid100">
+              <el-input-number v-model="formData.data.advanceRatio" placeholder="请输入" style="width: 100%" :precision="2" :min="0" :max="100"
+                               :controls="false" @change="(val)=>changeAdvanceRatio(val,true)" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" style="padding:0px 4px">
+            <el-form-item label="出货前付款比例" prop="beforeShipmentRatio" class="margin-b-0 wid100">
+              <el-input-number v-model="formData.data.beforeShipmentRatio" placeholder="请输入" style="width: 100%" :precision="2" :min="0" :max="100"
+                               :controls="false" @change="(val)=>changeAdvanceRatio(val,false)" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" style="padding:0px 4px">
+            <el-form-item label="出货后付款比例" prop="afterShipmentRatio" class="margin-b-0 wid100">
+              <el-input-number v-model="formData.data.afterShipmentRatio" placeholder=" " style="width: 100%" :precision="2" :min="0" :max="100"
+                               :controls="false" disabled />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </template>
+
       <template #commodity>
         <div style="width: 100%">
           <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!judgeStatus() && isEditList"
@@ -175,7 +198,7 @@
                     </el-table-column>
                     <el-table-column prop="productCode" label="物料编码" width="190" />
                     <el-table-column prop="productName" label="物料名称" min-width="200" />
-                    <el-table-column label="尺寸 (cm)" width="130">
+                    <el-table-column label="规格尺寸 (cm)" width="130">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
                           {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -237,31 +260,54 @@
                 <div v-else></div>
               </template>
             </el-table-column>
-            <el-table-column prop="productCnName" label="商品名称" min-width="130" />
-            <el-table-column prop="productCode" label="商品编码" width="150" />
-            <el-table-column label="尺寸 (cm)" width="130">
+            <el-table-column prop="productName" label="商品其他信息" width="500">
               <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                <div style="width: 100%;line-height:22px">
+                  <el-row :gutter="5">
+                    <el-col :span="12">
+                      分类:{{row.productClassifyName}}
+                    </el-col>
+                    <el-col :span="12">
+                      编码名称:{{row.productCode}}({{row.productName}})
+                    </el-col>
+                    <!-- <el-col :span="7">
+                      名称:{{row.productName}}
+                    </el-col> -->
+                  </el-row>
+                  <el-row :gutter="5">
+                    <el-col :span="12">
+                      规格尺寸 (cm): {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                    </el-col>
+                    <el-col :span="12">
+                      颜色:{{row.productColor}}
+                    </el-col>
+                  </el-row>
+                  <el-row :gutter="5">
+                    <el-col :span="12">
+                      纹路:{{dictKeyValue(row.productFrontalTexture,frontLinesData)}}
+                    </el-col>
+                    <el-col :span="6">
+                      净重: {{row.productNetWeight}}
+                    </el-col>
+                    <el-col :span="6">
+                      单位:{{row.productUnit}}
+                    </el-col>
+                  </el-row>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="productColor" label="颜色" width="140" />
-            <!-- <el-table-column label="设计图稿" width="80">
+
+            <!-- <el-table-column label="规格尺寸 (cm)" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-upload :action="uploadUrl" accept=".gif, .jpeg, .jpg, .png" :show-file-list="false" :data="uploadData"
-                             :before-upload="(file)=>handleBeforeUpload(file,$index)" :on-success="()=>handleSuccess($index)">
-                    <div v-loading="row.imgLoading">
-                      <img v-if="row.imageUrl" :src="row.imageUrl" class="pic" />
-                      <el-icon v-else class="avatar-uploader-icon">
-                        <Plus />
-                      </el-icon>
-                    </div>
-                  </el-upload>
+                  {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
                 </div>
               </template>
-            </el-table-column> -->
+            </el-table-column>
+            <el-table-column prop="productColor" label="颜色" width="140" />
+            <el-table-column prop="ww" label="纹路" width="140" />
+            <el-table-column prop="weight" label="净重" width="140" />
+            <el-table-column prop="unit" label="单位" width="140" /> -->
             <el-table-column label="生产plt文件" width="210">
               <template #default="{ row, $index }">
                 <div style="width:100%">
@@ -293,7 +339,7 @@
                   <el-form-item :prop="'contractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
                                 class="margin-b-0 wid100">
                     <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
-                                     :controls="false" :min="0" @change="calculationAmount('quantity')" v-if="isEditList" />
+                                     :controls="false" :min="0" @change="calculationAmount()" v-if="isEditList" />
                     <div v-else> {{row.quantity}}</div>
                   </el-form-item>
                 </div>
@@ -357,6 +403,8 @@
                 </div>
               </template>
             </el-table-column>
+            <el-table-column label="出厂单价" prop="factoryPrice" width="100">
+            </el-table-column>
             <el-table-column prop="amount" label="小计" width="110">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -364,6 +412,13 @@
                 </div>
               </template>
             </el-table-column>
+            <el-table-column prop="amountTwo" label="出厂小计金额" width="110">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  ¥ {{row.amountTwo}}
+                </div>
+              </template>
+            </el-table-column>
             <el-table-column label="备注" min-width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -448,7 +503,7 @@
       </template>
     </el-dialog>
 
-    <!-- <el-dialog v-if="copyContract" v-model="copyContract" :title="copyType === 1 ? '合同选择' : '样品单选择'" width="90%" append-to-body>
+    <!-- <el-dialog v-if="copyContract" v-model="copyContract" :title="copyType === 1 ? '订单选择' : '样品单选择'" width="90%" append-to-body>
       <SelectContract @select="selectContract" v-if="copyType === 1"></SelectContract>
       <SelectSample @select="selectContract" v-if="copyType === 2"></SelectSample>
     </el-dialog> -->
@@ -483,6 +538,21 @@ const fundsPaymentMethod = computed(
 const shippingMethod = computed(
   () => proxy.useUserStore().allDict["shipping_method"]
 );
+const contractChannel = computed(
+  () => proxy.useUserStore().allDict["contract_channel"]
+);
+const taxTransportationWay = computed(
+  () => proxy.useUserStore().allDict["tax_transportation_way"]
+);
+const shopName = computed(() => proxy.useUserStore().allDict["shop_name"]);
+
+const taxPoints = computed(() => proxy.useUserStore().allDict["tax_points"]);
+const settlementWay = computed(
+  () => proxy.useUserStore().allDict["settlement_way"]
+);
+const frontLinesData = computed(
+  () => proxy.useUserStore().allDict["front_lines"]
+);
 const companyId = computed(() => proxy.useUserStore().user.companyId);
 const accountList = ref([]);
 const customerList = ref([]);
@@ -507,6 +577,8 @@ const formData = reactive({
     contractProductList: [],
     companyId: "",
     templateContent: "",
+    contractChannel: "",
+    paymentMethod: "",
   },
 });
 const uploadData = ref({});
@@ -552,7 +624,7 @@ const formConfig = computed(() => {
     {
       type: "input",
       prop: "code",
-      label: "合同号",
+      label: "订单号",
       disabled: true,
       isShow: formData.data.code ? true : false,
     },
@@ -638,6 +710,31 @@ const formConfig = computed(() => {
     },
     {
       type: "select",
+      prop: "contractChannel",
+      label: "订单渠道",
+      data: contractChannel.value,
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "channelCode",
+      label: "渠道订单编号",
+      itemWidth: 50,
+      isShow:
+        formData.data.contractChannel &&
+        formData.data.contractChannel.includes("阿里巴巴")
+          ? true
+          : false,
+    },
+    {
+      type: "select",
+      prop: "salesmanId",
+      label: "业务员",
+      data: userList.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
       prop: "merchUserId",
       label: "跟单员",
       data: userList.value,
@@ -701,6 +798,14 @@ const formConfig = computed(() => {
     },
     {
       type: "select",
+      prop: "taxPoints",
+      label: "税点",
+      data: taxPoints.value,
+      itemWidth: 25,
+      isShow: formData.data.isTax && formData.data.isTax == "1" ? true : false,
+    },
+    {
+      type: "select",
       prop: "isFreight",
       label: "是否含运费",
       data: [
@@ -715,28 +820,50 @@ const formConfig = computed(() => {
       ],
       itemWidth: 25,
     },
+    // {
+    //   type: "select",
+    //   prop: "rr",
+    //   label: "结算方式",
+    //   data: settlementWay.value,
+    //   itemWidth: 25,
+    // },
     {
       type: "select",
       prop: "paymentMethod",
-      label: "付款方式",
+      label: "客户付款方式",
       data: fundsPaymentMethod.value,
       itemWidth: 25,
     },
+    // {
+    //   type: "select",
+    //   prop: "paymentMethod",
+    //   label: "付款方式",
+    //   data: fundsPaymentMethod.value,
+    //   itemWidth: 25,
+    // },
     {
-      type: "number",
-      prop: "advanceRatio",
-      label: "预付款比列(%)",
-      precision: 2,
-      min: 0,
-      controls: false,
+      type: "input",
+      prop: "alibabaCode",
+      label: "阿里巴巴订单编号",
+      itemType: "text",
       itemWidth: 25,
+      isShow:
+        formData.data.paymentMethod &&
+        formData.data.paymentMethod.includes("阿里巴巴")
+          ? true
+          : false,
     },
     {
-      type: "input",
-      prop: "remark",
-      label: "付款条件",
-      itemType: "textarea",
-      itemWidth: 100,
+      type: "select",
+      prop: "alibabaShopName",
+      label: "1688店铺名称",
+      data: shopName.value,
+      itemWidth: 25,
+      isShow:
+        formData.data.paymentMethod &&
+        formData.data.paymentMethod.includes("阿里巴巴")
+          ? true
+          : false,
     },
     {
       type: "select",
@@ -747,8 +874,119 @@ const formConfig = computed(() => {
       fn: (val) => {
         changeShroffAccount(val);
       },
+      isShow: formData.data.paymentMethod == "bank1",
+    },
+    {
+      type: "input",
+      prop: "accountName",
+      label: "户名",
+      placeholder: "请输入户名",
+      itemWidth: 50,
+      isShow:
+        formData.data.paymentMethod &&
+        formData.data.paymentMethod.includes("bank")
+          ? true
+          : false,
+    },
+    {
+      type: "input",
+      prop: "openingBank",
+      label: "开户行",
+      placeholder: "请输入开户行",
+      itemWidth: 50,
+      isShow:
+        formData.data.paymentMethod &&
+        formData.data.paymentMethod.includes("bank")
+          ? true
+          : false,
+    },
+    {
+      type: "input",
+      prop: "accountOpening",
+      label: "账号",
+      placeholder: "请输入账号",
+      itemWidth: 50,
+      isShow:
+        formData.data.paymentMethod &&
+        (formData.data.paymentMethod.includes("bank") ||
+          ["wxPay", "aliPay"].includes(formData.data.paymentMethod))
+          ? true
+          : false,
+    },
+    {
+      type: "input",
+      prop: "remark",
+      label: "其他收款方式备注说明",
+      itemType: "textarea",
+      itemWidth: 100,
+      isShow: formData.data.paymentMethod == "other",
+    },
+    {
+      type: "slot",
+      slotName: "advanceRatio",
+      prop: "",
+      label: "",
     },
     // {
+    //   type: "number",
+    //   prop: "advanceRatio",
+    //   label: "定⾦⽐例",
+    //   precision: 2,
+    //   min: 0,
+    //   max: 100,
+    //   controls: false,
+    //   itemWidth: 25,
+    //   fn: (val) => {
+    //     if (val && formData.data.beforeShipmentRatio) {
+    //       let total = val + formData.data.beforeShipmentRatio;
+    //       if (total > 100) {
+    //         formData.data.advanceRatio = null;
+    //         formData.data.beforeShipmentRatio = null;
+    //       }
+    //       formData.data.afterShipmentRatio = 100 - total;
+    //     }
+    //   },
+    // },
+    // {
+    //   type: "number",
+    //   prop: "beforeShipmentRatio",
+    //   label: "出货前付款⽐例",
+    //   precision: 2,
+    //   min: 0,
+    //   max: 100,
+    //   controls: false,
+    //   itemWidth: 25,
+    //   fn: (val) => {
+    //     if (val && formData.data.advanceRatio) {
+    //       let total = val + formData.data.advanceRatio;
+    //       if (total > 100) {
+    //         formData.data.advanceRatio = null;
+    //         formData.data.beforeShipmentRatio = null;
+    //       }
+    //       formData.data.afterShipmentRatio = 100 - total;
+    //     }
+    //   },
+    // },
+    // {
+    //   type: "number",
+    //   prop: "afterShipmentRatio",
+    //   label: "出货后尾款⽐例",
+    //   precision: 2,
+    //   min: 0,
+    //   max: 100,
+    //   controls: false,
+    //   itemWidth: 25,
+    //   disabled: true,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "remark",
+    //   label: "付款条件",
+    //   itemType: "textarea",
+    //   itemWidth: 100,
+    // },
+
+    // {
     //   type: "input",
     //   prop: "beneficiaryName",
     //   label: " ",
@@ -796,30 +1034,7 @@ const formConfig = computed(() => {
     //   itemWidth: 50,
     //   isShow: formData.data.contractType == "1",
     // },
-    {
-      type: "input",
-      prop: "accountName",
-      label: "户名",
-      placeholder: "请输入户名",
-      itemWidth: 50,
-      // isShow: formData.data.contractType == "2",
-    },
-    {
-      type: "input",
-      prop: "openingBank",
-      label: "开户行",
-      placeholder: "请输入开户行",
-      itemWidth: 50,
-      // isShow: formData.data.contractType == "2",
-    },
-    {
-      type: "input",
-      prop: "accountOpening",
-      label: "账号",
-      placeholder: "请输入账号",
-      itemWidth: 50,
-      // isShow: formData.data.contractType == "2",
-    },
+
     // {
     //   type: "slot",
     //   slotName: "payment",
@@ -832,6 +1047,12 @@ const formConfig = computed(() => {
     },
     {
       type: "date",
+      prop: "saleDate",
+      label: "销售日期",
+      itemWidth: 50,
+    },
+    {
+      type: "date",
       prop: "deliveryTime",
       label: "交货期限",
       itemWidth: 50,
@@ -843,6 +1064,13 @@ const formConfig = computed(() => {
       data: shippingMethod.value,
       itemWidth: 50,
     },
+    {
+      type: "select",
+      prop: "taxTransportationWay",
+      label: "税运⽅式",
+      data: taxTransportationWay.value,
+      itemWidth: 50,
+    },
     // {
     //   type: "input",
     //   prop: "transportRemark",
@@ -876,25 +1104,39 @@ const formConfig = computed(() => {
     },
     {
       type: "title",
-      title: "合同总金额",
+      title: "订单总金额",
       haveLine: true,
     },
     {
       type: "input",
       prop: "amount",
-      label: "合同总金额",
+      label: "订单总⾦额",
+      itemWidth: 25,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "factoryAmount",
+      label: "出⼚总⾦额",
+      itemWidth: 25,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "grossProfit",
+      label: "合计⽑利",
       itemWidth: 25,
       disabled: true,
     },
     {
       type: "title",
-      title: "合同模板",
+      title: "订单模板",
       haveLine: true,
     },
     {
       type: "select",
       prop: "contractTemplateId",
-      label: "合同模板",
+      label: "订单模板",
       data: templateList.value,
       itemWidth: 50,
       fn: (val) => {
@@ -914,6 +1156,7 @@ const formConfig = computed(() => {
     },
   ];
 });
+
 const rules = ref({
   ofCompanyId: [
     { required: true, message: "请选择业务公司", trigger: "change" },
@@ -930,6 +1173,7 @@ const rules = ref({
     { required: true, message: "请选择订单归属", trigger: "change" },
   ],
   merchUserId: [{ required: true, message: "请选择跟单员", trigger: "change" }],
+  salesmanId: [{ required: true, message: "请选择业务员", trigger: "change" }],
   isTax: [{ required: true, message: "请选择是否含税", trigger: "change" }],
   isFreight: [
     { required: true, message: "请选择是否含运费", trigger: "change" },
@@ -964,7 +1208,9 @@ const rules = ref({
   transportMethod: [
     { required: true, message: "请选择运输方式", trigger: "change" },
   ],
-  // remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
+  remark: [
+    { required: true, message: "请输入其他收款方式备注说明", trigger: "blur" },
+  ],
   rate: [{ required: true, message: "请输入汇率", trigger: "blur" }],
   shroffAccountId: [
     { required: true, message: "请选择收款账号", trigger: "change" },
@@ -975,6 +1221,29 @@ const rules = ref({
   templateContent: [
     { required: true, message: "请输入模板内容", trigger: "blur" },
   ],
+  contractChannel: [
+    { required: true, message: "请选择订单渠道", trigger: "change" },
+  ],
+  channelCode: [
+    { required: true, message: "请输入订单渠道编号", trigger: "blur" },
+  ],
+  saleDate: [{ required: true, message: "请选择销售日期", trigger: "change" }],
+  taxTransportationWay: [
+    { required: true, message: "请选择税运方式", trigger: "change" },
+  ],
+  beforeShipmentRatio: [
+    { required: true, message: "请输入出货前付款比例", trigger: "blur" },
+  ],
+  afterShipmentRatio: [
+    { required: true, message: "请输入出货后付款比例", trigger: "blur" },
+  ],
+  taxPoints: [{ required: true, message: "请选择税点", trigger: "change" }],
+  alibabaCode: [
+    { required: true, message: "请输入阿里巴巴编号", trigger: "blur" },
+  ],
+  alibabaShopName: [
+    { required: true, message: "请选择1688店铺名称", trigger: "change" },
+  ],
 });
 const getDict = () => {
   proxy
@@ -1177,6 +1446,39 @@ const changeCustomer = (val) => {
     formData.data.buyAddress = "";
   }
 };
+const changeAdvanceRatio = (val, flag) => {
+  if (val && flag) {
+    if (formData.data.beforeShipmentRatio > 0) {
+      let total = Number(
+        parseFloat(val + formData.data.beforeShipmentRatio).toFixed(2)
+      );
+      if (total > 100) {
+        formData.data.advanceRatio = null;
+        formData.data.beforeShipmentRatio = null;
+        formData.data.afterShipmentRatio = null;
+      } else {
+        formData.data.afterShipmentRatio = Number(
+          parseFloat(100 - total).toFixed(2)
+        );
+      }
+    }
+  } else if (val && !flag) {
+    if (formData.data.advanceRatio > 0) {
+      let total = Number(
+        parseFloat(val + formData.data.advanceRatio).toFixed(2)
+      );
+      if (total > 100) {
+        formData.data.advanceRatio = null;
+        formData.data.beforeShipmentRatio = null;
+        formData.data.afterShipmentRatio = null;
+      } else {
+        formData.data.afterShipmentRatio = Number(
+          parseFloat(100 - total).toFixed(2)
+        );
+      }
+    }
+  }
+};
 const createFilter = (queryString) => {
   return (restaurant) => {
     return (
@@ -1244,15 +1546,20 @@ const selectProduct = async (goods) => {
         formData.data.contractProductList.push({
           fileUrl: fileUrl,
           productId: goods.id,
-          productCnName: goods.name,
+          productClassifyName: goods.classifyName,
+          productName: goods.name,
           productCode: goods.customCode,
           productLength: goods["length"],
           productWidth: goods.width,
           productHeight: goods.height,
           productColor: goods.color,
+          productNetWeight: goods.netWeight,
+          productUnit: goods.unit,
+          productFrontalTexture: goods.frontalTexture,
           prodFilePath: goods.prodFilePath,
           quantity: null,
           price: goods.price || null,
+          factoryPrice: goods.factoryPrice || null,
           amount: "",
           remark: "",
           fileList: [],
@@ -1313,6 +1620,7 @@ const selectMaterial = (goods) => {
 };
 
 const changeProductPrice = () => {
+  return;
   let productIds = formData.data.contractProductList.map((x) => x.productId);
   if (productIds && productIds.length > 0) {
     proxy
@@ -1375,29 +1683,28 @@ const handleDeleteMaterial = (index, sonIndex) => {
   );
 };
 
-const calculationAmount = (att = "") => {
-  nextTick(() => {
-    if (
-      formData.data.contractProductList &&
-      formData.data.contractProductList.length > 0
-    ) {
-      for (let i = 0; i < formData.data.contractProductList.length; i++) {
-        let money = 0;
-        money = parseFloat(
-          Number(formData.data.contractProductList[i].quantity) *
-            Number(formData.data.contractProductList[i].price)
-        ).toFixed(2);
-        formData.data.contractProductList[i].amount = money;
-      }
+const calculationAmount = () => {
+  if (
+    formData.data.contractProductList &&
+    formData.data.contractProductList.length > 0
+  ) {
+    for (let i = 0; i < formData.data.contractProductList.length; i++) {
+      formData.data.contractProductList[i].amount = parseFloat(
+        Number(formData.data.contractProductList[i].quantity) *
+          Number(formData.data.contractProductList[i].price)
+      ).toFixed(2);
+      formData.data.contractProductList[i].amountTwo = parseFloat(
+        Number(formData.data.contractProductList[i].quantity) *
+          Number(formData.data.contractProductList[i].factoryPrice)
+      ).toFixed(2);
     }
-    nextTick(() => {
-      totalAmount();
-    });
-  });
+  }
+  totalAmount();
 };
 
 const totalAmount = () => {
   let money = 0;
+  let moneyTwo = 0;
   if (
     formData.data.contractProductList &&
     formData.data.contractProductList.length > 0
@@ -1408,6 +1715,12 @@ const totalAmount = () => {
           Number(money) + Number(formData.data.contractProductList[i].amount)
         ).toFixed(2);
       }
+      if (formData.data.contractProductList[i].amountTwo) {
+        moneyTwo = parseFloat(
+          Number(moneyTwo) +
+            Number(formData.data.contractProductList[i].amountTwo)
+        ).toFixed(2);
+      }
     }
   }
   if (
@@ -1423,6 +1736,10 @@ const totalAmount = () => {
     }
   }
   formData.data.amount = money;
+  formData.data.factoryAmount = moneyTwo;
+  formData.data.grossProfit = parseFloat(
+    Number(formData.data.amount) - Number(formData.data.factoryAmount)
+  ).toFixed(2);
 };
 const clickAdd = () => {
   if (
@@ -1775,6 +2092,7 @@ const getAllData = (businessId) => {
         });
       changeProductPrice();
     }
+    calculationAmount();
     if (formData.data.countryId) {
       getCityData(formData.data.countryId, "20");
     }
@@ -1844,7 +2162,7 @@ const getPriceSheetData = (id) => {
       quotationProductId: x.id,
       fileUrl: "",
       productId: x.productId,
-      productCnName: x.productName,
+      productName: x.productName,
       productCode: x.productCode,
       productLength: x.productLength,
       productWidth: x.productWidth,

+ 2 - 2
src/components/process/SF/ContractChange.vue

@@ -173,7 +173,7 @@
                     </el-table-column>
                     <el-table-column prop="productCode" label="物料编码" width="190" />
                     <el-table-column prop="productName" label="物料名称" min-width="200" />
-                    <el-table-column label="尺寸 (cm)" width="130">
+                    <el-table-column label="规格尺寸 (cm)" width="130">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
                           {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -237,7 +237,7 @@
             </el-table-column>
             <el-table-column prop="productCnName" label="商品名称" min-width="130" />
             <el-table-column prop="productCode" label="商品编码" width="150" />
-            <el-table-column label="尺寸 (cm)" width="130">
+            <el-table-column label="规格尺寸 (cm)" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 2 - 2
src/components/process/SF/PriceSheet.vue

@@ -137,7 +137,7 @@
                   </el-table-column>
                   <el-table-column prop="productCnName" label="商品名称" min-width="130" />
                   <el-table-column prop="productCode" label="商品编码" width="130" />
-                  <el-table-column label="尺寸 cm*cm*cm" width="180">
+                  <el-table-column label="规格尺寸 (cm)" width="180">
                     <template #default="{ row, $index }">
                       <div style="width: 100%">
                         {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -181,7 +181,7 @@
             </el-table-column>
             <el-table-column prop="productCnName" label="商品名称" min-width="130" />
             <el-table-column prop="productCode" label="商品编码" width="130" />
-            <el-table-column label="尺寸 cm*cm*cm" width="180">
+            <el-table-column label="规格尺寸 (cm)" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 239 - 50
src/components/process/SF/Purchase.vue

@@ -5,7 +5,7 @@
         <div>
           <el-button type="primary" v-if="
               [30].includes(route.query.processType) || !route.query.processType
-            " @click="clickCopy(1)">复制合同</el-button>
+            " @click="clickCopy(1)">复制订单</el-button>
         </div>
       </template>
       <template #seller>
@@ -125,7 +125,7 @@
       <template #commodity>
         <div style="width: 100%">
           <el-table :data="formData.data.purchaseProductList" style="width: 100%; ">
-            <el-table-column label="商品图片" width="80">
+            <el-table-column label="图片" width="80">
               <template #default="{ row }">
                 <div v-if="row.fileUrl">
                   <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
@@ -133,18 +133,23 @@
                 <div v-else></div>
               </template>
             </el-table-column>
-            <el-table-column prop="productName" label="商品名称" min-width="130" />
-            <el-table-column prop="productCode" label="商品编码" width="130" />
-            <el-table-column label="尺寸 (cm)" width="140">
+            <el-table-column prop="productCode" label="编码" width="150" />
+            <el-table-column prop="productName" label="名称" min-width="130" />
+            <el-table-column label="规格尺寸 (cm)" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
                 </div>
               </template>
             </el-table-column>
+            <el-table-column prop="productColor" label="颜色" width="130" />
+            <el-table-column prop="productNetWeight" label="净重" width="100" />
+            <el-table-column prop="productFrontalTexture" label="纹路" width="130"
+                             :formatter="(row) => dictKeyValue(row.productFrontalTexture, frontLinesData)" />
+            <el-table-column prop="productUnit" label="单位" width="100" />
             <el-table-column label="数量" prop="subscribeCount" width="100" v-if="route.query.ids" />
             <el-table-column label="已采购数量" prop="purchaseCount" width="100" v-if="route.query.ids" />
-            <el-table-column label="采购数量" width="130">
+            <el-table-column label="采购数量" width="110">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'purchaseProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
@@ -155,7 +160,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="单价" width="160">
+            <!-- <el-table-column label="单价" width="160">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'purchaseProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
@@ -203,19 +208,42 @@
                           </div>
                         </template>
                         <template #reference>
-                          <!-- <div style="margin-left:10px;cursor:pointer;position:relative;top:4px">
+                          <div style="margin-left:10px;cursor:pointer;position:relative;top:4px">
                             <el-icon :size="20" color="#85c1a6">
                               <WarningFilled />
                             </el-icon>
-                          </div> -->
+                          </div>
                         </template>
                       </el-popover>
                     </div>
                   </el-form-item>
                 </div>
               </template>
+            </el-table-column> -->
+            <el-table-column label="单价(不含税)" width="130">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'purchaseProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="单价(含税)" width="120">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'purchaseProductList.' + $index + '.taxPrice'" :rules="rules.taxPrice" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.taxPrice" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
+                  </el-form-item>
+                </div>
+              </template>
             </el-table-column>
-            <el-table-column prop="amount" label="小计" width="120" />
+            <el-table-column label="⼩计(不含税)" width="130" prop="amount" />
+            <el-table-column label="⼩计(含税)" width="120" prop="taxAmount" />
             <el-table-column label="备注" width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -313,6 +341,9 @@ const fundsPaymentMethod = computed(
 const shippingMethod = computed(
   () => proxy.useUserStore().allDict["shipping_method"]
 );
+const frontLinesData = computed(
+  () => proxy.useUserStore().allDict["front_lines"]
+);
 // const companyId = computed(() => proxy.useUserStore().user.companyId);
 const deliveryType = ref([
   {
@@ -328,6 +359,10 @@ const deliveryType = ref([
     value: "3",
   },
 ]);
+const treeData = ref([]);
+const userList = ref([]);
+const deptData = ref([]);
+const warehouseList = ref([]);
 const supplierList = ref([]);
 const corporationList = ref([]);
 const templateList = ref([]);
@@ -363,7 +398,7 @@ const judgeStatus = () => {
 };
 const formOption = reactive({
   inline: true,
-  labelWidth: 100,
+  labelWidth: 110,
   itemWidth: 100,
   disabled: false,
 });
@@ -382,9 +417,9 @@ const formConfig = computed(() => {
     {
       type: "input",
       prop: "code",
-      label: "合同号",
+      label: "订单号",
       isShow: formData.data.code ? true : false,
-      itemWidth: 50,
+      itemWidth: 25,
     },
     {
       type: "treeSelect",
@@ -393,8 +428,53 @@ const formConfig = computed(() => {
       data: proxy.useUserStore().allDict["tree_company_data"],
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
-      itemWidth: 50,
-      disabled: true,
+      itemWidth: 25,
+      // disabled: true,
+      fn: (val) => {
+        getDeptData(val);
+      },
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "业务部门",
+      data: deptData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "devUserId",
+      label: "采购员",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 25,
+    },
+    {
+      type: "date",
+      prop: "subcribeTime",
+      itemType: "date",
+      label: "采购日期",
+      itemWidth: 25,
+      disabled: false,
+    },
+    {
+      type: "treeSelect",
+      prop: "companyIdaa",
+      label: "生产单位",
+      data: treeData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "ss",
+      label: "入库仓库",
+      data: warehouseList.value,
+      itemWidth: 25,
     },
     {
       type: "title",
@@ -451,7 +531,7 @@ const formConfig = computed(() => {
       label: "交货类型",
       border: true,
       data: deliveryType.value,
-      itemWidth: 50,
+      itemWidth: 33.33,
       fn: () => {
         changeAddress();
       },
@@ -461,18 +541,46 @@ const formConfig = computed(() => {
       prop: "address",
       itemType: "text",
       label: "详细地址",
-      itemWidth: 50,
+      itemWidth: 33.33,
     },
     {
       type: "date",
       itemType: "date",
       prop: "deliveryTime",
       label: "交付日期",
-      itemWidth: 50,
+      itemWidth: 33.33,
       disabledFn: (date) => {
         return moment(date).isBefore(moment());
       },
     },
+    {
+      type: "select",
+      prop: "ea",
+      label: "报价是否含税",
+      filterable: true,
+      placeholder: " ",
+      disabled: true,
+      data: [
+        {
+          label: "是",
+          value: "1",
+        },
+        {
+          label: "否",
+          value: "0",
+        },
+      ],
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      prop: "privTaxPoints",
+      label: "供应商税点",
+      itemType: "text",
+      itemWidth: 33.33,
+      disabled: true,
+      placeholder: " ",
+    },
     // {
     //   type: "number",
     //   prop: "warranty",
@@ -517,25 +625,32 @@ const formConfig = computed(() => {
     },
     {
       type: "title",
-      title: "合同总金额",
+      title: "总金额",
       haveLine: true,
     },
     {
       type: "input",
       prop: "amount",
-      label: "合同总金额",
+      label: "总金额(不含税)",
+      itemWidth: 25,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "taxAmount",
+      label: "总金额(含税)",
       itemWidth: 25,
       disabled: true,
     },
     {
       type: "title",
-      title: "合同模板",
+      title: "订单模板",
       haveLine: true,
     },
     {
       type: "select",
       prop: "contractTemplateId",
-      label: "合同模板",
+      label: "订单模板",
       data: templateList.value,
       itemWidth: 50,
       fn: (val) => {
@@ -600,6 +715,18 @@ const rules = ref({
 });
 const getDict = () => {
   proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+      type: 0,
+    })
+    .then((res) => {
+      treeData.value = proxy.handleTree(res.data, "deptId");
+    });
+
+  proxy
     .post("/supplierInfo/page", {
       pageNum: 1,
       pageSize: 50,
@@ -637,6 +764,54 @@ const getDict = () => {
     });
 };
 
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: val,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: val,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+
+  proxy
+    .post("/warehouse/page", {
+      pageNum: 1,
+      pageSize: 999,
+      companyId: val,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        warehouseList.value = res.rows.map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
+};
+
 const changeAddress = () => {
   if (formData.data.deliveryType === "1") {
     let buyCountryName = "";
@@ -783,15 +958,14 @@ const changeSupplier = (val) => {
   formData.data.sellContactName = "";
   formData.data.sellContactNumber = "";
   if (val) {
-    let data = supplierList.value.filter((item) => item.id === val);
-    if (data && data.length > 0) {
-      formData.data.countryId = data[0].countryId;
-      formData.data.provinceId = data[0].provinceId;
-      formData.data.cityId = data[0].cityId;
-      formData.data.sellAddress = data[0].areaDetail;
-      formData.data.sellPostalCode = data[0].postalCode;
-      formData.data.sellContactName = data[0].contactPerson;
-      formData.data.sellContactNumber = data[0].contactNumber;
+    proxy.post("/supplierInfo/detail", { id: val }).then((res) => {
+      formData.data.countryId = res.countryId;
+      formData.data.provinceId = res.provinceId;
+      formData.data.cityId = res.cityId;
+      formData.data.sellAddress = res.areaDetail;
+      formData.data.sellPostalCode = res.postalCode;
+      formData.data.sellContactName = res.contactPerson;
+      formData.data.sellContactNumber = res.contactNumber;
       if (formData.data.countryId) {
         getCityData(formData.data.countryId, "20");
       }
@@ -799,11 +973,14 @@ const changeSupplier = (val) => {
         getCityData(formData.data.provinceId, "30");
       }
       setTimeout(() => changeAddress(), 1500);
-    }
+      formData.data.ea = res.privIncludingTax;
+      formData.data.privTaxPoints = res.privTaxPoints;
+    });
   }
 };
 
 const changeProductPrice = () => {
+  return;
   let productIds = formData.data.purchaseProductList.map((x) => x.productId);
   if (productIds && productIds.length > 0) {
     proxy
@@ -858,29 +1035,30 @@ const handleRemove = (index) => {
   formData.data.purchaseProductList.splice(index, 1);
   totalAmount();
 };
-const calculationAmount = (att = "") => {
-  nextTick(() => {
-    if (
-      formData.data.purchaseProductList &&
-      formData.data.purchaseProductList.length > 0
-    ) {
-      for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
-        let money = 0;
-        money = parseFloat(
-          Number(formData.data.purchaseProductList[i].quantity) *
-            Number(formData.data.purchaseProductList[i].price)
-        ).toFixed(2);
-        formData.data.purchaseProductList[i].amount = money;
-      }
+
+const calculationAmount = () => {
+  if (
+    formData.data.purchaseProductList &&
+    formData.data.purchaseProductList.length > 0
+  ) {
+    for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
+      formData.data.purchaseProductList[i].amount = parseFloat(
+        Number(formData.data.purchaseProductList[i].quantity) *
+          Number(formData.data.purchaseProductList[i].price)
+      ).toFixed(2);
+      formData.data.purchaseProductList[i].taxAmount = parseFloat(
+        Number(formData.data.purchaseProductList[i].quantity) *
+          Number(formData.data.purchaseProductList[i].taxPrice)
+      ).toFixed(2);
     }
-    nextTick(() => {
-      totalAmount();
-    });
-  });
+  }
+  totalAmount();
 };
 
 const totalAmount = () => {
   let money = 0;
+  let moneyTwo = 0;
+
   if (
     formData.data.purchaseProductList &&
     formData.data.purchaseProductList.length > 0
@@ -891,6 +1069,12 @@ const totalAmount = () => {
           Number(money) + Number(formData.data.purchaseProductList[i].amount)
         ).toFixed(2);
       }
+      if (formData.data.purchaseProductList[i].taxAmount) {
+        moneyTwo = parseFloat(
+          Number(moneyTwo) +
+            Number(formData.data.purchaseProductList[i].taxAmount)
+        ).toFixed(2);
+      }
     }
   }
   if (
@@ -906,6 +1090,7 @@ const totalAmount = () => {
     }
   }
   formData.data.amount = money;
+  formData.data.taxAmount = moneyTwo;
 };
 const clickAdd = () => {
   if (
@@ -1030,6 +1215,9 @@ const getAllData = (businessId) => {
         );
         changeProductPrice();
       }
+      if (formData.data.companyId) {
+        getDeptData(formData.data.companyId);
+      }
       if (formData.data.countryId) {
         getCityData(formData.data.countryId, "20");
       }
@@ -1044,6 +1232,7 @@ const getProductList = (ids) => {
   if (ids && ids.length > 0) {
     proxy.post("/subscribeDetail/detail", { ids }).then((res) => {
       formData.data.companyId = route.query.companyId;
+      getDeptData(formData.data.companyId);
       if (res && res.length > 0) {
         formData.data.purchaseProductList = res.map((item) => {
           let dataResourceId =

+ 1 - 1
src/components/process/SF/PurchaseChange.vue

@@ -135,7 +135,7 @@
             </el-table-column>
             <el-table-column prop="productName" label="商品名称" min-width="130" />
             <el-table-column prop="productCode" label="商品编码" width="130" />
-            <el-table-column label="尺寸 (cm)" width="140">
+            <el-table-column label="规格尺寸 (cm)" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 1 - 1
src/components/process/SF/ReturnGood.vue

@@ -24,7 +24,7 @@
             </el-table-column>
             <el-table-column prop="productCode" label="物料编码" width="190" />
             <el-table-column prop="productName" label="物料名称" min-width="200" />
-            <el-table-column label="尺寸 (cm)" width="140">
+            <el-table-column label="规格尺寸 (cm)" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 424 - 31
src/components/process/SF/Subscribe.vue

@@ -1,35 +1,63 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
     <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
-
       <template #commodity>
         <div style="width: 100%">
           <el-button type="primary" plain @click="openProduct = true" style="margin-bottom: 16px" v-if="!judgeStatus()">
             选择物料
           </el-button>
           <el-table :data="formData.data.subscribeDetailList" style="width: 100%; ">
-            <el-table-column prop="productCode" label="物料编码" width="130" />
-            <el-table-column prop="productName" label="物料名称" min-width="130" />
-            <el-table-column label="尺寸 cm*cm*cm" width="180">
+            <el-table-column prop="productCode" label="物料编码" width="150" />
+            <el-table-column prop="productName" label="物料名称" width="150" />
+            <el-table-column label="规格尺寸 (cm)" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="productUnit" label="单位" width="100" :formatter="(row) => dictKeyValue(row.productUnit, materialUnit)" />
-            <el-table-column label="申购数量" width="150">
+            <el-table-column prop="productColor" label="颜色" width="130" />
+            <el-table-column prop="productNetWeight" label="净重" width="100" />
+            <el-table-column prop="productFrontalTexture" label="纹路" width="130"
+                             :formatter="(row) => dictKeyValue(row.productFrontalTexture, frontLinesData)" />
+            <el-table-column prop="productUnit" label="单位" width="100" />
+            <!-- <el-table-column prop="productUnit" label="单位" width="100" :formatter="(row) => dictKeyValue(row.productUnit, materialUnit)" /> -->
+            <el-table-column label="申购数量" width="110">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'subscribeDetailList.' + $index + '.count'" :rules="rules.count" :inline-message="true"
                                 class="margin-b-0 wid100">
                     <el-input-number onmousewheel="return false;" v-model="row.count" placeholder="请输入" style="width: 100%" :precision="0"
-                                     :controls="false" :min="0" />
+                                     :controls="false" :min="0" @change="calculationAmount()" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="备注">
+            <el-table-column label="单价(不含税)" width="130">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'subscribeDetailList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="单价(含税)" width="120">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'subscribeDetailList.' + $index + '.priceIncludingTax'" :rules="rules.priceIncludingTax" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.priceIncludingTax" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="⼩计(不含税)" width="130" prop="amount" />
+            <el-table-column label="⼩计(含税)" width="120" prop="amountIncludingTax" />
+            <el-table-column label="备注" min-width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'subscribeDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true"
@@ -68,9 +96,18 @@ const openProduct = ref(false);
 const materialUnit = computed(
   () => proxy.useUserStore().allDict["material_unit"]
 );
+const frontLinesData = computed(
+  () => proxy.useUserStore().allDict["front_lines"]
+);
+const userList = ref([]);
+const deptData = ref([]);
+const warehouseList = ref([]);
+const supplierData = ref([]);
 const formData = reactive({
   data: {
     subscribeDetailList: [],
+    substituteFileList: [],
+    purposeFileList: [],
   },
 });
 const formDom = ref(null);
@@ -90,7 +127,7 @@ const judgeStatus = () => {
 };
 const formOption = reactive({
   inline: true,
-  labelWidth: 100,
+  labelWidth: 120,
   itemWidth: 100,
   disabled: false,
 });
@@ -101,19 +138,13 @@ const formConfig = computed(() => {
       title: "申购信息",
       haveLine: false,
     },
-    // {
-    //   type: "input",
-    //   prop: "deptName",
-    //   label: "申购部门",
-    //   itemWidth: 25,
-    //   disabled: true,
-    // },
     {
       type: "input",
-      prop: "subcribeName",
-      label: "申购",
-      itemWidth: 33.33,
+      prop: "code",
+      label: "申购单号",
+      itemWidth: 100,
       disabled: true,
+      isShow: formData.data.code ? true : false,
     },
     {
       type: "treeSelect",
@@ -122,21 +153,179 @@ const formConfig = computed(() => {
       data: proxy.useUserStore().allDict["tree_company_data"],
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
-      itemWidth: 33.33,
+      itemWidth: 25,
+      fn: (val) => {
+        getDeptData(val);
+      },
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "业务部门",
+      data: deptData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "subcribeUserId",
+      label: "申请人",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 25,
     },
     {
       type: "date",
       prop: "subcribeTime",
       itemType: "date",
-      label: "申时间",
-      itemWidth: 33.33,
+      label: "申请日期",
+      itemWidth: 25,
+      disabled: false,
+    },
+    {
+      type: "select",
+      prop: "putWarehouseId",
+      label: "入库仓库",
+      data: warehouseList.value,
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "isSubstitute",
+      label: "是否代他人提交",
+      data: [
+        {
+          label: "是",
+          value: 1,
+        },
+        {
+          label: "否",
+          value: 0,
+        },
+      ],
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "isInStock",
+      label: "是否入库",
+      data: [
+        {
+          label: "是",
+          value: 1,
+        },
+        {
+          label: "否",
+          value: 0,
+        },
+      ],
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "isAppoint",
+      label: "是否指定供应商",
+      data: [
+        {
+          label: "是",
+          value: "1",
+        },
+        {
+          label: "否",
+          value: "0",
+        },
+      ],
+      itemWidth: 25,
+      fn: (val) => {
+        if (val == "0") {
+          formData.data.supplierId = "";
+        }
+      },
+    },
+    {
+      type: "select",
+      prop: "supplierId",
+      label: "供应商",
+      data: supplierData.value,
+      itemWidth: 25,
+      isShow: formData.data.isAppoint == "1" ? true : false,
+      fn: (val) => {
+        changeSupplier(val);
+      },
+    },
+    {
+      type: "input",
+      prop: "contact",
+      itemType: "text",
+      label: "供应商联系方式",
+      itemWidth: 25,
+      placeholder: " ",
+      disabled: true,
+      isShow: formData.data.isAppoint == "1" ? true : false,
+    },
+    {
+      type: "select",
+      prop: "privIncludingTax",
+      label: "报价是否含税",
+      filterable: true,
+      placeholder: " ",
+      disabled: true,
+      data: [
+        {
+          label: "是",
+          value: "1",
+        },
+        {
+          label: "否",
+          value: "0",
+        },
+      ],
+      itemWidth: 25,
+      isShow: formData.data.isAppoint == "1" ? true : false,
+    },
+    {
+      type: "input",
+      prop: "privTaxPoints",
+      label: "供应商税点",
+      itemType: "text",
+      itemWidth: 25,
+      disabled: true,
+      placeholder: " ",
+      isShow: formData.data.isAppoint == "1" ? true : false,
+    },
+    {
+      type: "input",
+      prop: "purposeRemark",
+      itemType: "textarea",
+      label: "申请⽤途",
+      itemWidth: 100,
       disabled: false,
     },
     {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "purposeFileList",
+      label: "申请用途附件",
+      itemWidth: 100,
+    },
+    {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "substituteFileList",
+      label: "代他人提交附件证明",
+      isShow: formData.data.isSubstitute == "1" ? true : false,
+      itemWidth: 100,
+    },
+
+    {
       type: "input",
       prop: "subcribeContent",
       itemType: "textarea",
-      label: "申购说明",
+      label: "备注",
       itemWidth: 100,
       disabled: false,
     },
@@ -150,21 +339,173 @@ const formConfig = computed(() => {
       slotName: "commodity",
       label: "",
     },
+    {
+      type: "title",
+      title: "总金额",
+      haveLine: true,
+    },
+    {
+      type: "input",
+      prop: "amount",
+      label: "总金额(不含税)",
+      itemWidth: 25,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "amountIncludingTax",
+      label: "总金额(含税)",
+      itemWidth: 25,
+      disabled: true,
+    },
   ];
 });
 
 const rules = ref({
-  deptName: [{ required: true, message: "请输入申购部门", trigger: "blur" }],
-  subcribeName: [
-    { required: true, message: "请输入申购人名称", trigger: "blur" },
+  companyId: [{ required: true, message: "请选择业务公司", trigger: "change" }],
+  deptId: [{ required: true, message: "请选择业务部门", trigger: "change" }],
+  subcribeUserId: [
+    { required: true, message: "请选择申请人", trigger: "change" },
   ],
   subcribeTime: [
     { required: true, message: "请选择申购时间", trigger: "change" },
   ],
-  count: [{ required: true, message: "请输入申购数量", trigger: "blur" }],
-  companyId: [{ required: true, message: "请选择业务公司", trigger: "change" }],
+  putWarehouseId: [
+    { required: true, message: "请选择入库仓库", trigger: "change" },
+  ],
+  isSubstitute: [
+    { required: true, message: "请选择是否代他人提交", trigger: "change" },
+  ],
+  isInStock: [{ required: true, message: "请选择是否入库", trigger: "change" }],
+  isAppoint: [
+    { required: true, message: "请选择是否指定供应商", trigger: "change" },
+  ],
+  supplierId: [{ required: true, message: "请选择供应商", trigger: "change" }],
+  purposeRemark: [
+    { required: true, message: "请输入申请用途", trigger: "blur" },
+  ],
+  count: [{ required: true, message: "请输入数量", trigger: "blur" }],
+  price: [{ required: true, message: "请输入单价(不含税)", trigger: "blur" }],
+  priceIncludingTax: [
+    { required: true, message: "请输入单价(含税)", trigger: "blur" },
+  ],
 });
 
+const changeSupplier = (val) => {
+  proxy.post("/supplierInfo/detail", { id: val }).then((res) => {
+    formData.data.contact = res.contactPerson + "," + res.contactNumber;
+    formData.data.privIncludingTax = res.privIncludingTax;
+    formData.data.privTaxPoints = res.privTaxPoints;
+  });
+};
+
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: val,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: val,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+
+  proxy
+    .post("/warehouse/page", {
+      pageNum: 1,
+      pageSize: 999,
+      companyId: val,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        warehouseList.value = res.rows.map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
+};
+
+const getDict = () => {
+  proxy
+    .post("/supplierInfo/page", {
+      pageNum: 1,
+      pageSize: 9999,
+    })
+    .then((res) => {
+      supplierData.value = res.rows.map((x) => ({
+        label: x.name,
+        value: x.id,
+      }));
+    });
+};
+getDict();
+
+const calculationAmount = () => {
+  if (
+    formData.data.subscribeDetailList &&
+    formData.data.subscribeDetailList.length > 0
+  ) {
+    for (let i = 0; i < formData.data.subscribeDetailList.length; i++) {
+      formData.data.subscribeDetailList[i].amount = parseFloat(
+        Number(formData.data.subscribeDetailList[i].count) *
+          Number(formData.data.subscribeDetailList[i].price)
+      ).toFixed(2);
+      formData.data.subscribeDetailList[i].amountIncludingTax = parseFloat(
+        Number(formData.data.subscribeDetailList[i].count) *
+          Number(formData.data.subscribeDetailList[i].priceIncludingTax)
+      ).toFixed(2);
+    }
+  }
+  totalAmount();
+};
+
+const totalAmount = () => {
+  let money = 0;
+  let moneyTwo = 0;
+  if (
+    formData.data.subscribeDetailList &&
+    formData.data.subscribeDetailList.length > 0
+  ) {
+    for (let i = 0; i < formData.data.subscribeDetailList.length; i++) {
+      if (formData.data.subscribeDetailList[i].amount) {
+        money = parseFloat(
+          Number(money) + Number(formData.data.subscribeDetailList[i].amount)
+        ).toFixed(2);
+      }
+      if (formData.data.subscribeDetailList[i].amountIncludingTax) {
+        moneyTwo = parseFloat(
+          Number(moneyTwo) +
+            Number(formData.data.subscribeDetailList[i].amountIncludingTax)
+        ).toFixed(2);
+      }
+    }
+  }
+  formData.data.amount = money;
+  formData.data.amountIncludingTax = moneyTwo;
+};
+
 const selectMaterial = (row) => {
   let flag = formData.data.subscribeDetailList.some(
     (x) => x.productId == row.id
@@ -178,7 +519,14 @@ const selectMaterial = (row) => {
       productLength: row["length"],
       productWidth: row.width,
       productHeight: row.height,
+      productColor: row.color,
+      productNetWeight: row.netWeight,
+      productFrontalTexture: row.frontalTexture,
       count: null,
+      price: null,
+      priceIncludingTax: null,
+      amount: "",
+      amountIncludingTax: "",
       remark: "",
     });
     proxy.msgTip("选择成功");
@@ -194,6 +542,14 @@ const handleRemove = (index) => {
 const handleSubmit = async () => {
   let flag = await formDom.value.handleSubmit(() => {});
   if (flag) {
+    if (formData.data.isSubstitute == "1") {
+      if (
+        formData.data.substituteFileList &&
+        !(formData.data.substituteFileList.length > 0)
+      ) {
+        return proxy.msgTip("请上传代他人提交附件证明", 2);
+      }
+    }
     if (
       formData.data.subscribeDetailList &&
       formData.data.subscribeDetailList.length > 0
@@ -225,15 +581,52 @@ const getAllData = (businessId) => {
   if (businessId) {
     proxy.post("/subscribe/detail", { id: businessId }).then((res) => {
       formData.data = res;
+      if (formData.data.supplierId) {
+        formData.data.isAppoint = "1";
+        changeSupplier(formData.data.supplierId);
+      } else {
+        formData.data.isAppoint = "0";
+      }
+      if (formData.data.companyId) {
+        getDeptData(formData.data.companyId);
+      }
+      calculationAmount();
+      proxy
+        .post("/fileInfo/getList", { businessIdList: [businessId] })
+        .then((fileObj) => {
+          if (fileObj[businessId] && fileObj[businessId].length > 0) {
+            formData.data.purposeFileList = fileObj[businessId]
+              .filter((x) => x.businessType == "15")
+              .map((item) => {
+                return {
+                  ...item,
+                  name: item.fileName,
+                  url: item.fileUrl,
+                };
+              });
+            formData.data.substituteFileList = fileObj[businessId]
+              .filter((x) => x.businessType == "10")
+              .map((item) => {
+                return {
+                  ...item,
+                  name: item.fileName,
+                  url: item.fileUrl,
+                };
+              });
+          } else {
+            formData.data.purposeFileList = [];
+            formData.data.substituteFileList = [];
+          }
+        });
     });
   }
 };
 onMounted(() => {
   formOption.disabled = judgeStatus();
   formData.data.subcribeTime = proxy.parseTime(new Date());
-  formData.data.deptName = proxy.useUserStore().user.dept.deptName;
-  formData.data.deptId = proxy.useUserStore().user.dept.deptId;
-  formData.data.subcribeName = proxy.useUserStore().user.nickName;
+  // formData.data.deptName = proxy.useUserStore().user.dept.deptName;
+  // formData.data.deptId = proxy.useUserStore().user.dept.deptId;
+  // formData.data.subcribeName = proxy.useUserStore().user.nickName;
   if (route.query.businessId && route.query.processType) {
     getAllData(route.query.businessId);
   }

+ 1 - 1
src/components/product/SelectCompanyProduct.vue

@@ -214,7 +214,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "产品规格",
+        label: "规格尺寸 (cm)",
         prop: "spec",
         width: 120,
       },

+ 1 - 1
src/components/product/SelectProduct.vue

@@ -235,7 +235,7 @@ const config = computed(() => {
     // },
     // {
     //   attrs: {
-    //     label: "产品规格",
+    //     label: "规格尺寸 (cm)",
     //     prop: "spec",
     //     width: 120,
     //   },

+ 12 - 2
src/components/product/treeList.vue

@@ -240,9 +240,19 @@ const handleMouseOver = (data) => {
   console.log(data, "sss");
   // currentNode.id = toRaw(data).id;
 };
-
+const ids = [
+  "100",
+  "200",
+  "300",
+  "400",
+  "500",
+  "600",
+  "700",
+  "800",
+  "900",
+  "110",
+];
 const getShowIcon = (data) => {
-  let ids = ["100", "200", "300", "400"];
   return !ids.includes(data.id);
 };
 </script>

+ 3 - 3
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -58,7 +58,7 @@
                   </el-table-column>
                   <el-table-column prop="productCode" label="商品编码" width="200" />
                   <el-table-column prop="productName" label="商品名称" min-width="130" />
-                  <el-table-column label="尺寸 (cm)" width="140">
+                  <el-table-column label="规格尺寸 (cm)" width="140">
                     <template #default="{ row, $index }">
                       <div style="width: 100%">
                         {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -94,7 +94,7 @@
                   </el-table-column>
                   <el-table-column prop="productCode" label="商品编码" width="200" />
                   <el-table-column prop="productName" label="商品名称" min-width="130" />
-                  <el-table-column label="尺寸 (cm)" width="140">
+                  <el-table-column label="规格尺寸 (cm)" width="140">
                     <template #default="{ row, $index }">
                       <div style="width: 100%">
                         {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -124,7 +124,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="200" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
+              <el-table-column label="规格尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 88 - 10
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -428,6 +428,12 @@ const currencyData = computed(
 );
 const packAskData = computed(() => proxy.useUserStore().allDict["pack_ask"]);
 const foldWayData = computed(() => proxy.useUserStore().allDict["fold_way"]);
+const backLinesData = computed(
+  () => proxy.useUserStore().allDict["back_lines"]
+);
+const frontLinesData = computed(
+  () => proxy.useUserStore().allDict["front_lines"]
+);
 
 const headers = ref({ Authorization: "Bearer " + getToken() });
 const uploadData = ref({});
@@ -474,7 +480,13 @@ const rules = ref({
   ],
   foldWay: [{ required: true, message: "请选择折叠数", trigger: "change" }],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
-  remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
+  // remark: [{ required: true, message: "请输入描述", trigger: "blur" }],
+  // reverseTexture: [
+  //   { required: true, message: "请选择背面纹路", trigger: "change" },
+  // ],
+  // frontalTexture: [
+  //   { required: true, message: "请选择正面纹路", trigger: "change" },
+  // ],
 });
 const props = defineProps({
   selectStatus: Boolean,
@@ -533,14 +545,14 @@ const config = computed(() => {
     // },
     // {
     //   attrs: {
-    //     label: "产品规格",
+    //     label: "规格尺寸 (cm)",
     //     prop: "spec",
     //     width: 120,
     //   },
     // },
     {
       attrs: {
-        label: "尺寸 (cm)",
+        label: "规格尺寸 (cm)",
         slot: "size",
         width: 130,
       },
@@ -554,6 +566,23 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "计量单位",
+        prop: "unit",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "正面纹路",
+        prop: "frontalTexture",
+        width: 130,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, frontLinesData.value);
+      },
+    },
+    {
+      attrs: {
         label: "净重",
         prop: "netWeight",
         width: 100,
@@ -752,14 +781,45 @@ const formConfig = computed(() => {
       disabled: false,
     },
     {
-      type: "uploadImg",
-      // listType: "picture-card",
-      // limit: 1,
-      // accept: ".gif, .jpeg, .jpg, .png",
-      prop: "fileList",
-      imgProp: "imageUrl",
-      label: "产品缩略图",
+      type: "number",
+      prop: "factoryPrice",
+      label: "出⼚单价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "number",
+      prop: "flatPrice",
+      label: "平铺价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "select",
+      prop: "frontalTexture",
+      label: "正面纹路",
+      data: frontLinesData.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "reverseTexture",
+      label: "背面纹路",
+      data: backLinesData.value,
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "unit",
+      label: "计量单位",
       itemWidth: 50,
+      disabled: false,
     },
     {
       type: "input",
@@ -769,6 +829,24 @@ const formConfig = computed(() => {
       disabled: false,
     },
     {
+      type: "input",
+      itemType: "textarea",
+      prop: "remark",
+      label: "描述",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "uploadImg",
+      // listType: "picture-card",
+      // limit: 1,
+      // accept: ".gif, .jpeg, .jpg, .png",
+      prop: "fileList",
+      imgProp: "imageUrl",
+      label: "产品缩略图",
+      itemWidth: 100,
+    },
+    {
       type: "slot",
       slotName: "productionFileOne",
       label: "产品原图",

+ 68 - 13
src/views/EHSD/productLibrary/waitCreateProduct/index.vue

@@ -279,7 +279,12 @@ const currencyData = computed(
 );
 const packAskData = computed(() => proxy.useUserStore().allDict["pack_ask"]);
 const foldWayData = computed(() => proxy.useUserStore().allDict["fold_way"]);
-
+const backLinesData = computed(
+  () => proxy.useUserStore().allDict["back_lines"]
+);
+const frontLinesData = computed(
+  () => proxy.useUserStore().allDict["front_lines"]
+);
 const headers = ref({ Authorization: "Bearer " + getToken() });
 const uploadData = ref({});
 const tableHeight = ref(0);
@@ -325,7 +330,7 @@ const rules = ref({
   ],
   foldWay: [{ required: true, message: "请选择折叠数", trigger: "change" }],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
-  remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
+  // remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
 });
 const props = defineProps({
   selectStatus: Boolean,
@@ -389,7 +394,7 @@ const config = computed(() => {
     // },
     // {
     //   attrs: {
-    //     label: "产品规格",
+    //     label: "规格尺寸 (cm)",
     //     prop: "spec",
     //     width: 120,
     //   },
@@ -417,7 +422,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "尺寸 (cm)",
+        label: "规格尺寸 (cm)",
         slot: "size",
         // width: 130,
       },
@@ -617,23 +622,72 @@ const formConfig = computed(() => {
       disabled: false,
     },
     {
-      type: "uploadImg",
-      // listType: "picture-card",
-      // limit: 1,
-      // accept: ".gif, .jpeg, .jpg, .png",
-      prop: "fileList",
-      imgProp: "imageUrl",
-      label: "产品缩略图",
+      type: "number",
+      prop: "factoryPrice",
+      label: "出⼚单价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "number",
+      prop: "flatPrice",
+      label: "平铺价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "select",
+      prop: "frontalTexture",
+      label: "正面纹路",
+      data: frontLinesData.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "reverseTexture",
+      label: "背面纹路",
+      data: backLinesData.value,
       itemWidth: 50,
     },
     {
       type: "input",
+      prop: "unit",
+      label: "计量单位",
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "input",
       prop: "hsCode",
       label: "海关编码",
       itemWidth: 50,
       disabled: false,
     },
     {
+      type: "input",
+      itemType: "textarea",
+      prop: "remark",
+      label: "描述",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "uploadImg",
+      // listType: "picture-card",
+      // limit: 1,
+      // accept: ".gif, .jpeg, .jpg, .png",
+      prop: "fileList",
+      imgProp: "imageUrl",
+      label: "产品缩略图",
+      itemWidth: 100,
+    },
+    {
       type: "slot",
       slotName: "productionFileOne",
       label: "产品原图",
@@ -958,7 +1012,6 @@ const getDtl = (row) => {
   modalType.value = "add";
   formData.data = {
     definition: "1",
-
     extQuotationProductId: row.id,
     ...row,
     companyId: proxy.useUserStore().user.companyId,
@@ -966,7 +1019,9 @@ const getDtl = (row) => {
     name: "",
     customCode: row.productCode,
     nameEnglish: "",
-    price: null,
+    price: row.price || null,
+    factoryPrice: row.businessCostPrice || null,
+    flatPrice: null,
     imageUrl: "",
     fileList: [],
     hsCode: "",

+ 2 - 2
src/views/EHSD/saleContract/PriceSheetDetail.vue

@@ -101,7 +101,7 @@
                     </el-table-column>
                     <el-table-column prop="productCode" label="物料编码" width="190" />
                     <el-table-column prop="productName" label="物料名称" min-width="200" />
-                    <el-table-column label="尺寸 (cm)" width="150">
+                    <el-table-column label="规格尺寸 (cm)" width="150">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
                           {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -123,7 +123,7 @@
             </el-table-column>
             <el-table-column prop="productCode" label="商品编码" width="190" />
             <el-table-column prop="productName" label="商品名称" min-width="200" />
-            <el-table-column label="尺寸 (cm)" width="150">
+            <el-table-column label="规格尺寸 (cm)" width="150">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 14 - 0
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -654,6 +654,20 @@ const config = computed(() => {
     // },
     {
       attrs: {
+        label: "已出库数量",
+        prop: "aa",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "待出库数量",
+        prop: "bb",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
         label: "是否已结清",
         slot: "isSettled",
         width: 100,

+ 2 - 2
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -484,7 +484,7 @@
                       </el-table-column>
                       <el-table-column prop="productCode" label="物料编码" width="190" />
                       <el-table-column prop="productName" label="物料名称" min-width="200" />
-                      <el-table-column label="尺寸 (cm)" width="150">
+                      <el-table-column label="规格尺寸 (cm)" width="150">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
                             {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -508,7 +508,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="190" />
               <el-table-column prop="productName" label="商品名称" min-width="200" />
-              <el-table-column label="尺寸 (cm)" width="150">
+              <el-table-column label="规格尺寸 (cm)" width="150">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 3 - 3
src/views/EHSD/saleContract/priceSheetEstimate/index.vue

@@ -74,7 +74,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="190" />
               <el-table-column prop="productName" label="商品名称" min-width="200" />
-              <el-table-column label="尺寸 (cm)" width="150">
+              <el-table-column label="规格尺寸 (cm)" width="150">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -568,7 +568,7 @@
                       </el-table-column>
                       <el-table-column prop="productCode" label="物料编码" width="190" />
                       <el-table-column prop="productName" label="物料名称" min-width="200" />
-                      <el-table-column label="尺寸 (cm)" width="150">
+                      <el-table-column label="规格尺寸 (cm)" width="150">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
                             {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -613,7 +613,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="190" />
               <el-table-column prop="productName" label="商品名称" min-width="200" />
-              <el-table-column label="尺寸 (cm)" width="150">
+              <el-table-column label="规格尺寸 (cm)" width="150">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 2 - 2
src/views/EHSD/saleContract/priceSheetForeign/index.vue

@@ -157,7 +157,7 @@
                       </el-table-column>
                       <el-table-column prop="productCode" label="物料编码" width="190" />
                       <el-table-column prop="productName" label="物料名称" min-width="200" />
-                      <el-table-column label="尺寸 (cm)" width="150">
+                      <el-table-column label="规格尺寸 (cm)" width="150">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
                             {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -201,7 +201,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="190" />
               <el-table-column prop="productName" label="商品名称" min-width="200" />
-              <el-table-column label="尺寸 (cm)" width="150">
+              <el-table-column label="规格尺寸 (cm)" width="150">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 5 - 5
src/views/MES/processScheduling/index.vue

@@ -346,7 +346,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="200" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
+              <el-table-column label="规格尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -371,7 +371,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="200" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
+              <el-table-column label="规格尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -398,7 +398,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="200" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
+              <el-table-column label="规格尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -701,7 +701,7 @@ const config = ref([
   // },
   // {
   //   attrs: {
-  //     label: "产品尺寸 (cm)",
+  //     label: "规格尺寸 (cm)",
   //     slot: "size",
   //     width: 160,
   //   },
@@ -867,7 +867,7 @@ const configOne = ref([
   },
   {
     attrs: {
-      label: "产品尺寸 (cm)",
+      label: "规格尺寸 (cm)",
       slot: "size",
       width: 160,
     },

+ 2 - 2
src/views/MES/productionOrder/index.vue

@@ -170,7 +170,7 @@
                       </el-table-column>
                       <el-table-column prop="productCode" label="物料编码" width="190" />
                       <el-table-column prop="productName" label="物料名称" min-width="200" />
-                      <el-table-column label="尺寸 (cm)" width="150">
+                      <el-table-column label="规格尺寸 (cm)" width="150">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
                             {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -193,7 +193,7 @@
               </el-table-column>
               <el-table-column prop="productCnName" label="商品名称" min-width="150" />
               <el-table-column prop="productCode" label="商品编码" width="200" />
-              <el-table-column label="尺寸 (cm)" width="130">
+              <el-table-column label="规格尺寸 (cm)" width="130">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 535 - 118
src/views/MES/productionTask/index.vue

@@ -1,118 +1,199 @@
 <template>
   <div class="pageIndexClass">
-    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
-             :selectConfig="selectConfig" :action-list="[ {
+    <byTable :hideTable="true" :hidePagination="true" :config="[]" highlight-current-row :selectConfig="selectConfig" :action-list="[ {
+                text: '打印任务单',
+                action: () => openModal('add'),
+                disabled: selectIds.length==0,
+              }]" @get-list="getList">
+    </byTable>
+
+    <div style="background:#fff">
+      <el-tabs v-model="pageActiveName" type="card" class="demo-tabs" @tab-change="handlePageTabChange">
+        <el-tab-pane label="在手任务" name="1">
+        </el-tab-pane>
+        <el-tab-pane label="已完成" name="2">
+        </el-tab-pane>
+        <el-tab-pane label="所有任务" name="3">
+        </el-tab-pane>
+        <el-tab-pane label="车间工序结存" name="4">
+        </el-tab-pane>
+        <el-tab-pane v-for="item in processesData" :label="item.name" :name="item.id" :key="item.id">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+    <div v-if="['1','2','3','4'].includes(pageActiveName)">
+      <byTable :hideSearch="true" :otherHeight="80" :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading"
+               highlight-current-row :selectConfig="selectConfig" :action-list="[ {
                 text: '打印任务单',
                 action: () => openModal('add'),
                 disabled: selectIds.length==0,
               } 
               
         ]" :table-events="{
-          //element talbe事件都能传
-          select: selectRow,
+             select: selectRow,
        'select-all':selectRow
-        }" @get-list="getList">
+        }" :row-class-name="getRowClass" @get-list="getList">
 
-      <template #orderCode="{ item }">
-        <div style="width: 100%" class="el-click" @click="lookDetails(item)">
-          {{item.orderCode}}
-        </div>
-      </template>
+        <template #orderCode="{ item }">
+          <div style="width: 100%" class="el-click" @click="lookDetails(item)">
+            {{item.orderCode}}
+          </div>
+        </template>
 
-      <template #pic="{ item }">
-        <div v-if="item.fileList &&item.fileList.length > 0">
-          <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
-        </div>
-        <div v-else></div>
-      </template>
+        <template #pic="{ item }">
+          <div v-if="item.fileList &&item.fileList.length > 0">
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
+          </div>
+          <div v-else></div>
+        </template>
 
-      <template #picOne="{ item }">
-        <div v-if="item.fileListOne &&item.fileListOne.length > 0">
-          <img :src="item.fileListOne[0].fileUrl" class="pic" @click="handleClickFile(item.fileListOne[0])" />
-        </div>
-        <div v-else></div>
-      </template>
+        <template #picOne="{ item }">
+          <div v-if="item.fileListOne &&item.fileListOne.length > 0">
+            <img :src="item.fileListOne[0].fileUrl" class="pic" @click="handleClickFile(item.fileListOne[0])" />
+          </div>
+          <div v-else></div>
+        </template>
 
-      <template #size="{ item }">
-        <div v-if="item.productLength && item.productWidth && item.productHeight">
-          <span>{{ item.productLength }}</span>*
-          <span>{{ item.productWidth }}</span>*
-          <span>{{ item.productHeight }}</span>
-        </div>
-      </template>
+        <template #size="{ item }">
+          <div v-if="item.productLength && item.productWidth && item.productHeight">
+            <span>{{ item.productLength }}</span>*
+            <span>{{ item.productWidth }}</span>*
+            <span>{{ item.productHeight }}</span>
+          </div>
+          <div v-else></div>
+        </template>
 
-      <template #isOverdue="{item}">
-        <div style="width: 100%">
-          <span class="red" v-if="item.isOverdue=='1'"> 逾期 </span>
-          <span v-else> 未逾期 </span>
-        </div>
-      </template>
+        <template #isOverdue="{item}">
+          <div style="width: 100%">
+            <span v-if="item.isOverdue=='1'" class="red"> 逾期 </span>
+            <span v-else> 未逾期 </span>
+          </div>
+        </template>
 
-      <template #produceStatus="{item}">
-        <div style="width: 100%">
-          <span class="red" v-if="item.produceStatus=='99'"> 作废 </span>
-          <span v-else> {{dictValueLabel(item.produceStatus, statusData)}} </span>
-        </div>
-      </template>
+        <template #produceStatus="{item}">
+          <div style="width: 100%">
+            <span class="red" v-if="item.produceStatus=='99'"> 作废 </span>
+            <span v-else> {{dictValueLabel(item.produceStatus, statusData)}} </span>
+          </div>
+        </template>
 
-      <template #progress="{item}">
-        <div style="width: 100%">
-          <el-progress type="circle" :percentage="(Number(item.finishQuantity) / Number(item.quantity))*100" width="60"
-                       :status="(Number(item.finishQuantity) / Number(item.quantity))*100 == 100 ? 'success' : ''" />
-        </div>
-      </template>
+        <template #progress="{item}">
+          <div style="width: 100%">
+            <el-progress type="circle" :percentage="(Number(item.finishQuantity) / Number(item.quantity))*100" width="60"
+                         :status="(Number(item.finishQuantity) / Number(item.quantity))*100 == 100 ? 'success' : ''" />
+          </div>
+        </template>
+
+        <template #prodTag="{ item }">
+          <div style="width: 100%">
+            <el-popover placement="top-start" :width="300" trigger="hover">
+              <div>
+                备注:{{item.prodRemark}}
+              </div>
+              <template #reference>
+                <div style="width:100%;display:inline-block">
+                  <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" :key="index">
+                    {{ dictKeyValue(tag, contractTag) }}
+                  </el-tag>
+                </div>
+              </template>
+            </el-popover>
+          </div>
+        </template>
 
-      <template #prodTag="{ item }">
-        <div style="width: 100%">
-          <el-popover placement="top-start" :width="300" trigger="hover">
-            <div>
-              备注:{{item.prodRemark}}
+        <template v-for="(slotItem, index) in processesData" v-slot:[slotItem.id]="{ item }" :key="slotItem.id">
+          <div style="width:100%">
+            <div v-if="pageActiveName !='4'">
+              <span v-if="isShowCotent(slotItem,item)" style="font-weight:700;min-width:50px;line-height:18px;display:inline-block"
+                    :class="showCotentQuantity(slotItem,item)">
+                {{showCotent(slotItem,item,'finishQuantity')}}
+              </span>
+              <div v-else class="no-bk">
+                -
+              </div>
             </div>
-            <template #reference>
-              <div style="width:100%;display:inline-block">
-                <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" :key="index">
-                  {{ dictKeyValue(tag, contractTag) }}
-                </el-tag>
+            <!-- style="border-top:1px solid #ebeef5;margin-top:3px" -->
+            <div v-else>
+              <div v-if="isShowCotent(slotItem,item)">
+                {{showCotent(slotItem,item,'balanceQuantity') || `&nbsp`}}
               </div>
-            </template>
-          </el-popover>
-        </div>
-      </template>
+              <div v-else class="no-bk">
+                -
+              </div>
+            </div>
+
+          </div>
+        </template>
+      </byTable>
+    </div>
+
+    <div v-else>
+      <byTable :source="sourceListOne.data" :otherHeight="65" :pagination="sourceListOne.pagination" :config="configOne" :loading="loading"
+               highlight-current-row :selectConfig="selectConfigOne" :action-list="[{
+                text: '排程',
+                action: () => addScheduling('add'),
+                disabled: false,
+              } ]" :table-events="{
+          //element talbe事件都能传
+          select: selectRow,
+       'select-all':selectRow
+        }" @get-list="getTableList">
 
-      <template #other="{item}">
-        <div style="width: 100%">
-          <div>
-            完成:
+        <template #pic="{ item }">
+          <div v-if="item.fileList &&item.fileList.length > 0">
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
           </div>
-          <div style="border-top:1px solid #ebeef5;margin-top:3px">
-            结存:
+          <div v-else></div>
+        </template>
+
+        <template #picOne="{ item }">
+          <div v-if="item.fileListOne &&item.fileListOne.length > 0">
+            <img :src="item.fileListOne[0].fileUrl" class="pic" @click="handleClickFile(item.fileListOne[0])" />
           </div>
-        </div>
-      </template>
+          <div v-else></div>
+        </template>
 
-      <template v-for="(slotItem, index) in processesData" v-slot:[slotItem.id]="{ item }" :key="slotItem.id">
-        <div style="width:100%">
-          <div>
-            <span v-if="isShowCotent(slotItem,item)" style="font-weight:700;min-width:50px;line-height:18px;display:inline-block"
-                  :class="showCotentQuantity(slotItem,item)">
-              {{showCotent(slotItem,item,'finishQuantity')}}
-            </span>
-            <div v-else class="no-bk">
-              -
-            </div>
+        <template #size="{ item }">
+          <div v-if="item.productLength && item.productWidth && item.productHeight">
+            <span>{{ item.productLength }}</span>*
+            <span>{{ item.productWidth }}</span>*
+            <span>{{ item.productHeight }}</span>
           </div>
-          <div style="border-top:1px solid #ebeef5;margin-top:3px">
-            <div v-if="isShowCotent(slotItem,item)">
-              {{showCotent(slotItem,item,'balanceQuantity') || `&nbsp`}}
-            </div>
-            <div v-else class="no-bk">
-              -
-            </div>
+        </template>
+
+        <template #isOverdue="{item}">
+          <div style="width: 100%">
+            <span class="red" v-if="item.isOverdue=='1'"> 逾期 </span>
+            <span v-else> 未逾期 </span>
           </div>
+        </template>
 
-        </div>
-      </template>
-    </byTable>
+        <template #progress="{item}">
+          <div style="width: 100%">
+            <el-progress type="circle" :percentage="(Number(item.finishQuantity) / Number(item.quantity))*100" width="60"
+                         :status="(Number(item.finishQuantity) / Number(item.quantity))*100 == 100 ? 'success' : ''" />
+          </div>
+        </template>
+
+        <template #prodTag="{ item }">
+          <div style="width: 100%">
+            <el-popover placement="top-start" :width="300" trigger="hover">
+              <div>
+                备注:{{item.prodRemark}}
+              </div>
+              <template #reference>
+                <div style="width:100%;display:inline-block">
+                  <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" :key="index">
+                    {{ dictKeyValue(tag, contractTag) }}
+                  </el-tag>
+                </div>
+              </template>
+            </el-popover>
+          </div>
+        </template>
+
+      </byTable>
+    </div>
 
     <el-dialog :title="'打印任务单'" v-model="dialogVisible" width="840px" destroy-on-close :before-close="beforeClose">
       <div style="height:calc(100vh - 280px);overflow:auto;padding: 0 10px">
@@ -314,7 +395,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="200" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
+              <el-table-column label="规格尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -339,7 +420,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="200" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
+              <el-table-column label="规格尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -366,7 +447,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="200" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
+              <el-table-column label="规格尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -383,6 +464,48 @@
         <el-button @click="recordDialog = false" size="defualt" v-debounce>关闭</el-button>
       </template> -->
     </el-dialog>
+
+    <el-dialog :title="'排程'" v-model="schedulingDialog" width="50%" destroy-on-close>
+      <byForm :formConfig="formConfigOne" :formOption="formOptionOne" v-model="formDataOne.data" :rules="rulesOne" ref="formDomOne"
+              v-loading="submitLoading">
+
+        <template #addList>
+          <div style="width:100%">
+            <el-button type="primary" @click="openSelectTask=true" plain style="margin-bottom: 16px">生产任务</el-button>
+            <el-table :data="formDataOne.data.list" border>
+              <el-table-column label="生产任务" prop="label" />
+              <el-table-column label="总生产件数" prop="allQuantity" width="110" />
+              <el-table-column label="未排程件数" prop="waitQuantity" width="110" />
+              <el-table-column label="排程数量" width="110">
+                <template #default="{ row, $index }">
+                  <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
+                                     :controls="false" :min="1" />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" width="60" align="center" fixed="right">
+                <template #default="{ row,$index }">
+                  <el-button type="primary" link @click="clickDeteleOne($index)">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="schedulingDialog = false" size="defualt">取 消</el-button>
+        <el-button type="danger" @click="deleteRecordOne()" v-if="isShowDeteleBtn" size="defualt">删 除</el-button>
+        <el-button type="primary" @click="submitFormOne()" size="defualt">提 交</el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog :title="'选择生产任务'" v-model="openSelectTask" width="90%" destroy-on-close>
+      <SelectProductionTask @selectTask="selectTask" :processesId="pageActiveName"></SelectProductionTask>
+      <template #footer>
+        <el-button @click="openSelectTask = false" size="defualt" v-debounce>取 消</el-button>
+      </template>
+    </el-dialog>
   </div>
 
 </template>
@@ -392,11 +515,31 @@ import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import QRCode from "qrcodejs2-fix";
 import moment from "moment";
+import SelectProductionTask from "@/views/MES/productionTask/selectProductionTask.vue";
 
 const { proxy } = getCurrentInstance();
 const contractTag = computed(
   () => proxy.useUserStore().allDict["contract_prod_tag"]
 );
+const pageActiveName = ref("1");
+const handlePageTabChange = (val) => {
+  switch (val) {
+    case "1":
+      break;
+    case "2":
+      break;
+    case "3":
+      break;
+    case "4":
+      break;
+    default:
+      getTableList();
+      break;
+  }
+  if (["1", "2", "3", "4"].includes(val)) {
+    getList();
+  }
+};
 const companyData = ref([]);
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -560,14 +703,18 @@ const config = ref([
   },
   {
     attrs: {
-      label: "生产状态",
-      // prop: "produceStatus",
-      slot: "produceStatus",
-      width: 100,
+      label: "订单号",
+      slot: "orderCode",
+      width: 130,
       fixed: "left",
     },
-    render(val) {
-      return proxy.dictValueLabel(val, statusData.value);
+  },
+  {
+    attrs: {
+      label: "产品名称",
+      prop: "productName",
+      "min-width": 200,
+      fixed: "left",
     },
   },
   {
@@ -582,7 +729,18 @@ const config = ref([
       label: "是否逾期",
       slot: "isOverdue",
       width: 80,
-      // fixed: "left",
+      fixed: "left",
+    },
+  },
+  {
+    attrs: {
+      label: "生产状态",
+      // prop: "produceStatus",
+      slot: "produceStatus",
+      width: 100,
+    },
+    render(val) {
+      return proxy.dictValueLabel(val, statusData.value);
     },
   },
   {
@@ -613,13 +771,6 @@ const config = ref([
   },
   {
     attrs: {
-      label: "订单号",
-      slot: "orderCode",
-      width: 130,
-    },
-  },
-  {
-    attrs: {
       label: "产品图片",
       slot: "pic",
       width: 80,
@@ -641,14 +792,7 @@ const config = ref([
   },
   {
     attrs: {
-      label: "产品名称",
-      prop: "productName",
-      "min-width": 200,
-    },
-  },
-  {
-    attrs: {
-      label: "产品尺寸 (cm)",
+      label: "规格尺寸(cm)",
       slot: "size",
       width: 160,
     },
@@ -745,16 +889,148 @@ const config = ref([
       "min-width": 200,
     },
   },
+]);
+
+const sourceListOne = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    schedulingDate: "",
+  },
+});
+sourceListOne.value.pagination.schedulingDate = moment().format(
+  "yyyy-MM-DD HH:mm:ss"
+);
+
+const selectConfigOne = computed(() => [
+  {
+    type: "time",
+    label: "排程日期",
+    placeholder: "排程日期",
+    prop: "schedulingDate",
+    placeholderOne: "",
+    propOne: "",
+    fn: () => {
+      getTableList();
+    },
+  },
+]);
+
+const configOne = ref([
+  {
+    attrs: {
+      label: "工序",
+      prop: "processesName",
+      width: 80,
+      fixed: "left",
+    },
+  },
+  {
+    attrs: {
+      label: "排程日期",
+      prop: "schedulingDate",
+      width: 100,
+      fixed: "left",
+    },
+  },
+  {
+    attrs: {
+      label: "排程数量",
+      prop: "quantity",
+      width: 100,
+      fixed: "left",
+    },
+  },
+
+  {
+    attrs: {
+      label: "订单号",
+      prop: "orderCode",
+      width: 130,
+    },
+  },
+  {
+    attrs: {
+      label: "产品编码",
+      prop: "productCode",
+      width: 180,
+    },
+  },
+  {
+    attrs: {
+      label: "产品名称",
+      prop: "productName",
+      "min-width": 200,
+    },
+  },
+  {
+    attrs: {
+      label: "规格尺寸 (cm)",
+      slot: "size",
+      width: 160,
+    },
+  },
+  {
+    attrs: {
+      label: "产品颜色",
+      prop: "productColor",
+      width: 160,
+    },
+  },
   {
     attrs: {
-      label: "",
-      slot: "other",
+      label: "生产件数",
+      prop: "taskQuantity",
+      width: 100,
+    },
+  },
+  {
+    attrs: {
+      label: "已排程数量",
+      prop: "sumQuantity",
+      width: 100,
+    },
+  },
+  {
+    attrs: {
+      label: "操作",
+      width: "120",
       align: "center",
-      width: 70,
       fixed: "right",
     },
+    renderHTML(row) {
+      return [
+        {
+          attrs: {
+            label: "修改",
+            type: "primary",
+            text: true,
+          },
+          el: "button",
+          click() {
+            addScheduling("edit", row);
+          },
+        },
+        {
+          attrs: {
+            label: "删除",
+            type: "danger",
+            text: true,
+          },
+          el: "button",
+          click() {
+            formData.data.id = row.id;
+            deleteRecordOne();
+          },
+        },
+      ];
+    },
   },
 ]);
+
 const formData = reactive({
   data: {},
   recordData: {},
@@ -781,6 +1057,24 @@ const rules = ref({
   remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
 });
 
+const getTableList = (req) => {
+  sourceListOne.value.pagination = {
+    ...sourceListOne.value.pagination,
+    ...req,
+  };
+  sourceListOne.value.pagination.processesId = pageActiveName.value;
+  loading.value = true;
+  proxy
+    .post("/productionScheduling/page", sourceListOne.value.pagination)
+    .then((res) => {
+      sourceListOne.value.data = res.rows;
+      sourceListOne.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
@@ -935,7 +1229,7 @@ const getProcesses = () => {
           isNeedHeaderSlot: false,
           width: 70,
           align: "center",
-          fixed: "right",
+          // fixed: "right",
         };
         config.value.push({
           attrs,
@@ -1178,6 +1472,124 @@ const lookDetails = (item) => {
       }
     });
 };
+
+const getRowClass = ({ row }) => {
+  if (row.isOverdue == "1") {
+    return "redClass";
+  }
+};
+const formDomOne = ref(null);
+const formDataOne = reactive({
+  data: {},
+});
+const formOptionOne = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+});
+const formConfigOne = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "processesName",
+      label: "工序名称",
+      itemWidth: 100,
+      disabled: true,
+    },
+    {
+      type: "date",
+      prop: "schedulingDate",
+      itemType: "date",
+      label: "排程日期",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "slot",
+      slotName: "addList",
+      label: "排程明细",
+    },
+  ];
+});
+const rulesOne = ref({
+  schedulingDate: [
+    { required: true, message: "请选择排程日期", trigger: "change" },
+  ],
+  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+});
+
+const openSelectTask = ref(false);
+const schedulingDialog = ref(false);
+const currentProcessesData = ref({});
+const addScheduling = (type, row = {}) => {
+  currentProcessesData.value = processesData.value.find(
+    (x) => x.id == pageActiveName.value
+  );
+  modalType.value = type;
+  schedulingDialog.value = true;
+  formDataOne.data = {
+    processesName: currentProcessesData.value.name,
+    processesId: currentProcessesData.value.id,
+    schedulingDate: moment().format("YYYY-MM-DD"),
+    list: [],
+  };
+};
+
+const selectTask = (row) => {
+  let flag = formDataOne.data.list.some((x) => x.taskId == row.id);
+  if (!flag) {
+    let schedulingCount = 0;
+    let current = row.productionTaskProgressList.find(
+      (x) => x.processesId == pageActiveName.value
+    );
+    if (current) {
+      schedulingCount = current.schedulingCount;
+    }
+    formDataOne.data.list.push({
+      taskId: row.id,
+      label: row.orderCode + `,${row.productCode}(${row.productName})`,
+      allQuantity: row.quantity,
+      waitQuantity: Number(
+        parseFloat(row.quantity - schedulingCount).toFixed(2)
+      ),
+      quantity: null,
+    });
+    openSelectTask.value = false;
+    return proxy.msgTip("选择成功");
+  }
+  return proxy.msgTip("该任务已选择", 2);
+};
+
+const clickDeteleOne = (index) => {
+  formData.data.list.splice(index, 1);
+};
+
+const submitFormOne = () => {
+  formDomOne.value.handleSubmit((valid) => {
+    if (modalType.value == "add") {
+      if (!(formDataOne.data.list && formDataOne.data.list.length > 0)) {
+        return proxy.msgTip("请添加排程明细", 2);
+      }
+    }
+    submitLoading.value = true;
+    proxy
+      .post(
+        "/productionScheduling/" + modalType.value,
+        modalType.value == "add" ? formDataOne.data.list : formDataOne.data
+      )
+      .then(
+        (res) => {
+          proxy.msgTip("操作成功", 1);
+          schedulingDialog.value = false;
+          submitLoading.value = false;
+          getTableList();
+        },
+        (err) => {
+          submitLoading.value = false;
+        }
+      );
+  });
+};
 </script>
 
 <style lang="scss" scoped>
@@ -1227,6 +1639,11 @@ const lookDetails = (item) => {
   // background: #f3f3f3;
   // height: 50px;
 }
+.redClass {
+  background: red !important;
+  background-color: red !important;
+  // color:  !important;
+}
 .red {
   background: red;
   border-radius: 2px;

+ 3 - 3
src/views/MES/productionTask/selectProductionTask.vue

@@ -273,7 +273,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="160" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
+              <el-table-column label="规格尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -298,7 +298,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="160" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
+              <el-table-column label="规格尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -574,7 +574,7 @@ const config = ref([
   },
   {
     attrs: {
-      label: "产品尺寸 (cm)",
+      label: "规格尺寸 (cm)",
       slot: "size",
       width: 160,
     },

+ 1 - 1
src/views/MES/reportDetail/index.vue

@@ -149,7 +149,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "产品尺寸 (cm)",
+        label: "规格尺寸 (cm)",
         slot: "size",
         // width: 160,
       },

+ 2 - 2
src/views/index.vue

@@ -206,7 +206,7 @@
                       </el-table-column>
                       <el-table-column prop="productCode" label="物料编码" width="190" />
                       <el-table-column prop="productName" label="物料名称" min-width="200" />
-                      <el-table-column label="尺寸 (cm)" width="150">
+                      <el-table-column label="规格尺寸 (cm)" width="150">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
                             {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -229,7 +229,7 @@
               </el-table-column>
               <el-table-column prop="productCnName" label="商品名称" min-width="130" />
               <el-table-column prop="productCode" label="商品编码" width="130" />
-              <el-table-column label="尺寸 (cm)" width="150">
+              <el-table-column label="规格尺寸 (cm)" width="150">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 1 - 1
src/views/monitor/online/index.vue

@@ -36,7 +36,7 @@
          </el-table-column>
          <el-table-column label="会话编号" align="center" prop="tokenId" :show-overflow-tooltip="true" />
          <el-table-column label="登录名称" align="center" prop="userName" :show-overflow-tooltip="true" />
-         <el-table-column label="所属部门" align="center" prop="deptName" :show-overflow-tooltip="true" />
+         <el-table-column label="业务部门" align="center" prop="deptName" :show-overflow-tooltip="true" />
          <el-table-column label="主机" align="center" prop="ipaddr" :show-overflow-tooltip="true" />
          <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
          <el-table-column label="操作系统" align="center" prop="os" :show-overflow-tooltip="true" />

+ 1 - 1
src/views/oa/mailList/interior/index.vue

@@ -189,7 +189,7 @@ const formConfig = computed(() => {
     {
       type: "input",
       prop: "deptName",
-      label: "所属部门",
+      label: "业务部门",
       disabled: true,
     },
     {

+ 41 - 8
src/views/process/processApproval/index.vue

@@ -131,15 +131,21 @@
       </el-tabs>
     </div>
 
-    <el-dialog title="下一处理人" width="400" v-model="dialogVisible" v-if="dialogVisible" :show-close="true" :close-on-click-modal="false"
+    <el-dialog :title="dialogTitle" width="400" v-model="dialogVisible" v-if="dialogVisible" :show-close="true" :close-on-click-modal="false"
                :close-on-press-escape="false">
       <el-form :model="flowForm">
-        <el-form-item prop="remark" label="处理人">
+        <el-form-item label="处理人" v-if="nextHandleUser && nextHandleUser.length>0">
           <el-select v-model="flowForm.handleUserId" placeholder="请选择" filterable style="width: 100%">
             <el-option v-for="item in nextHandleUser" :label="item.nickName" :value="item.userId">
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="退回节点" v-if="flowDefinitionNodeList && flowDefinitionNodeList.length>0">
+          <el-select v-model="flowForm.handleNodeId" placeholder="请选择" filterable style="width: 100%">
+            <el-option v-for="item in flowDefinitionNodeList" :label="item.nodeName" :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item>
           <div style="width: 100%; text-align: center">
             <el-button type="primary" @click="handleSelectUser">提交</el-button>
@@ -212,23 +218,50 @@ const { proxy } = getCurrentInstance();
 const makeDom = ref(null);
 const flowFormDom = ref(null);
 let dialogVisible = ref(false);
+const dialogTitle = ref("");
 const nextHandleUser = ref([]);
+const flowDefinitionNodeList = ref([]);
 const handleType = ref(null);
 const handleSelectUser = () => {
-  if (!flowForm.handleUserId) {
-    return ElMessage({
-      message: "请选择下一节点处理人!",
-      type: "info",
-    });
+  if (nextHandleUser.value && nextHandleUser.value.length > 0) {
+    if (!flowForm.handleUserId) {
+      return ElMessage({
+        message: "请选择下一节点处理人!",
+        type: "info",
+      });
+    }
+  }
+  if (flowDefinitionNodeList.value && flowDefinitionNodeList.value.length > 0) {
+    if (!flowForm.handleNodeId) {
+      return ElMessage({
+        message: "请选择要退回的节点!",
+        type: "info",
+      });
+    }
   }
+
   handleSubmit(handleType.value);
 };
+
 const handleResult = (res) => {
-  if (res.userList == null && res.success) {
+  if (
+    (res.userList == null && res.success) ||
+    (res.flowDefinitionNodeList == null && res.success)
+  ) {
     skipPage();
   } else if (res.userList && res.userList.length > 0) {
+    flowDefinitionNodeList.value = [];
+    dialogTitle.value = "下一处理人";
     dialogVisible.value = true;
     nextHandleUser.value = res.userList;
+  } else if (
+    res.flowDefinitionNodeList &&
+    res.flowDefinitionNodeList.length > 0
+  ) {
+    nextHandleUser.value = [];
+    dialogTitle.value = "退回到指定节点";
+    dialogVisible.value = true;
+    flowDefinitionNodeList.value = res.flowDefinitionNodeList;
   } else {
     return ElMessage({
       message: "请联系管理员!",

+ 13 - 1
src/views/process/processConfig/vueFlow.vue

@@ -251,13 +251,25 @@ const formConfig = computed(() => {
           value: 2,
         },
         {
-          label: "返回上一步",
+          label: "退回",
           value: 3,
         },
         {
           label: "退回到发起人",
           value: 4,
         },
+        {
+          label: "加签",
+          value: 6,
+        },
+        {
+          label: "移交",
+          value: 7,
+        },
+        {
+          label: "退回到指定节点",
+          value: 8,
+        },
       ],
     },
     {

+ 70 - 8
src/views/product/material/index.vue

@@ -101,7 +101,7 @@
           </el-table-column>
           <el-table-column prop="name" label="产品名称" min-width="130" />
           <el-table-column prop="customCode" label="产品编码" width="180" />
-          <el-table-column label="尺寸 (cm)" width="130">
+          <el-table-column label="规格尺寸 (cm)" width="130">
             <template #default="{ row, $index }">
               <div style="width: 100%">
                 {{row['length']}} * {{row.width}} * {{row.height}}
@@ -255,9 +255,9 @@ const config = computed(() => {
         prop: "unit",
         width: 80,
       },
-      render(val) {
-        return proxy.dictKeyValue(val, materialUnitData.value);
-      },
+      // render(val) {
+      //   return proxy.dictKeyValue(val, materialUnitData.value);
+      // },
     },
     {
       attrs: {
@@ -428,22 +428,26 @@ const formConfig = computed(() => {
       imgProp: "imageUrl",
       prop: "fileList",
       label: "物料缩略图",
+      isShow: !isSpecial.value,
     },
     {
       type: "title1",
       title: "材质特征",
+      isShow: !isSpecial.value,
     },
     {
       type: "input",
       prop: "material",
       label: "材质",
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
       type: "input",
       prop: "spec",
       label: "型号",
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
       type: "select",
@@ -451,6 +455,7 @@ const formConfig = computed(() => {
       label: "正面纹路",
       data: frontLinesData.value,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
       type: "select",
@@ -458,20 +463,30 @@ const formConfig = computed(() => {
       label: "背面纹路",
       data: backLinesData.value,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
-      type: "select",
+      type: "input",
       prop: "unit",
       label: "单位",
-      data: materialUnitData.value,
+      // data: materialUnitData.value,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
+    // {
+    //   type: "select",
+    //   prop: "unit",
+    //   label: "单位",
+    //   data: materialUnitData.value,
+    //   itemWidth: 50,
+    // },
     {
       type: "select",
       prop: "colorLayer",
       label: "色层",
       data: colorLayerData.value,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     // {
     //   type: "input",
@@ -482,12 +497,14 @@ const formConfig = computed(() => {
     {
       type: "title1",
       title: "规格",
+      isShow: !isSpecial.value,
     },
     {
       type: "input",
       prop: "color",
       label: "颜色",
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
       type: "number",
@@ -497,6 +514,7 @@ const formConfig = computed(() => {
       min: 0,
       controls: false,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
       type: "number",
@@ -506,6 +524,7 @@ const formConfig = computed(() => {
       min: 0.01,
       controls: false,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     // {
     //   type: "selectInput",
@@ -524,6 +543,17 @@ const formConfig = computed(() => {
       min: 0.01,
       controls: false,
       itemWidth: 50,
+      isShow: !isSpecial.value,
+    },
+    {
+      type: "number",
+      prop: "price",
+      label: "销售价(cm²)",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      isShow: isSpecial.value,
     },
     // {
     //   type: "selectInput",
@@ -541,6 +571,7 @@ const formConfig = computed(() => {
       label: "",
       itemWidth: 50,
       disabled: false,
+      isShow: !isSpecial.value,
     },
     {
       type: "number",
@@ -550,6 +581,7 @@ const formConfig = computed(() => {
       min: 0,
       controls: false,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
   ];
 });
@@ -579,7 +611,9 @@ const treeChange = (e) => {
   }
 };
 
+const isSpecial = ref(false);
 const openModal = () => {
+  isSpecial.value = false;
   dialogVisible.value = true;
   modalType.value = "add";
   formData.data = {
@@ -594,8 +628,10 @@ const openModal = () => {
 
 const submitForm = () => {
   formDom.value.handleSubmit((valid) => {
-    if (!formData.data.fileList.length > 0) {
-      return proxy.msgTip("请上传图片", 2);
+    if (!isSpecial.value) {
+      if (!formData.data.fileList.length > 0) {
+        return proxy.msgTip("请上传图片", 2);
+      }
     }
     submitLoading.value = true;
     proxy.post("/productInfo/" + modalType.value, formData.data).then(
@@ -632,6 +668,32 @@ const getTreeList = () => {
 const changeProductClassifyId = (val) => {
   let current = findNodeById(treeData.value, val);
   if (current) {
+    // 判断是否是无属性原材料
+    if (current.id == 110) {
+      isSpecial.value = true;
+    } else {
+      if (current.parentIdSet) {
+        // 判断父级id是否包含无属性原材料
+        isSpecial.value = current.parentIdSet.includes("110");
+      } else {
+        // 不是无属性原材料
+        isSpecial.value = false;
+      }
+    }
+
+    if (isSpecial.value == true) {
+      for (const key in formData.data) {
+        if (
+          ["id", "name", "customCode", "price", "productClassifyId"].includes(
+            key
+          )
+        ) {
+        } else {
+          delete formData.data[key];
+        }
+      }
+    }
+
     if (current.id == 100) {
       isShowLabel.value = true;
     } else {

+ 2 - 1
src/views/purchaseManage/purchaseManage/purchase/index.vue

@@ -165,6 +165,7 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     status: "15,30",
+    isWaitPurchase: "1",
   },
 });
 let dialogVisible = ref(false);
@@ -247,7 +248,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "尺寸 (cm)",
+        label: "规格尺寸 (cm)",
         slot: "size",
         width: 140,
       },

+ 330 - 24
src/views/purchaseManage/supplier/supplier/index.vue

@@ -18,30 +18,30 @@
         </template>
       </byTable>
     </div>
-    <el-dialog :title="modalType == 'add' ? '添加供应商' : '编辑供应商'" v-model="dialogVisible" width="600" v-loading="loading" destroy-on-close>
+    <el-dialog :title="modalType == 'add' ? '添加供应商' : '编辑供应商'" v-model="dialogVisible" width="60%" v-loading="loading" destroy-on-close>
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
-
         <template #address>
           <div style="width:100%">
             <el-row style="width:100%">
               <el-col :span="8">
-                <el-form-item label="" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
+                <el-form-item label="" prop="countryId" style="width:100%">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)"
+                             style="width:100%">
                     <el-option v-for="item in countryData" :label="item.name" :value="item.id">
                     </el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
-                <el-form-item label="" prop="provinceName">
+                <el-form-item label="" prop="provinceName" style="width:100%">
                   <selectCity placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
-                              v-model="formData.data" :data="provinceData">
+                              v-model="formData.data" :data="provinceData" style="width:100%">
                   </selectCity>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
-                <el-form-item label="" prop="cityName">
-                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData">
+                <el-form-item label="" prop="cityName" style="width:100%">
+                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData" style="width:100%">
                   </selectCity>
                 </el-form-item>
               </el-col>
@@ -87,6 +87,67 @@
             </el-col>
           </el-row>
         </template>
+
+        <template #otherContacts>
+          <div style="width: 100%;padding-left:20px">
+            <el-button type="primary" @click="clickAddPerson">添 加</el-button>
+            <el-table :data="formData.data.contactList" style="width: 100%; margin-top: 16px">
+              <el-table-column label="姓名" width="150">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item :prop="'contactList.' + $index + '.name'" class="margin-b-0 wid100" :rules="rules.name2" :inline-message="true">
+                      <el-input v-model="row.name" placeholder="请输入姓名" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="职位" width="150">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item :prop="'contactList.' + $index + '.position'" class="margin-b-0 wid100" :rules="rules.position"
+                                  :inline-message="true">
+                      <el-input v-model="row.position" placeholder="请输入职位" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="电话" width="200">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item :prop="'contactList.' + $index + '.phoneNum'" class="margin-b-0 wid100" :rules="rules.phoneNum"
+                                  :inline-message="true">
+                      <el-input v-model="row.phoneNum" placeholder="请输入电话" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="邮箱" width="200">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item :prop="'contactList.' + $index + '.email'" class="margin-b-0 wid100" :rules="rules.email" :inline-message="true">
+                      <el-input v-model="row.email" placeholder="请输入邮箱" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="备注" min-width="200">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item :prop="'contactList.' + $index + '.remark'" class="margin-b-0 wid100" :rules="rules.remark" :inline-message="true">
+                      <el-input v-model="row.remark" placeholder="请输入备注" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column align="center" label="操作" width="80" fixed="right">
+                <template #default="{ row, $index }">
+                  <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="default">取 消</el-button>
@@ -110,10 +171,22 @@ const { proxy } = getCurrentInstance();
 const supplierType = computed(
   () => proxy.useUserStore().allDict["supplier_type"]
 );
+const supplierGrade = computed(
+  () => proxy.useUserStore().allDict["supplier_grade"]
+);
+const supplierStatus = computed(
+  () => proxy.useUserStore().allDict["supplier_status"]
+);
+const invoiceType = computed(
+  () => proxy.useUserStore().allDict["invoice_type"]
+);
+
 const loading = ref(false);
 const submitLoading = ref(false);
 const treeData = ref([]);
 const companyData = ref([]);
+const userList = ref([]);
+const deptData = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -129,8 +202,12 @@ let modalType = ref("add");
 const uploadData = ref({});
 let rules = ref({
   companyId: [{ required: true, message: "请选择业务公司", trigger: "change" }],
+  devUserId: [{ required: true, message: "请选择开发人员", trigger: "change" }],
+  deptId: [{ required: true, message: "请选择业务部门", trigger: "change" }],
   name: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
   type: [{ required: true, message: "请选择供应商类型", trigger: "change" }],
+  grade: [{ required: true, message: "请选择供应商等级", trigger: "change" }],
+  status: [{ required: true, message: "请选择供应商状态", trigger: "change" }],
   countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
   // provinceId: [{ required: true, message: "请选择省/洲", trigger: "change" }],
   // cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
@@ -139,6 +216,9 @@ let rules = ref({
   contactNumber: [
     { required: true, message: "请输入联系电话", trigger: "blur" },
   ],
+  name2: [{ required: true, message: "请输入姓名", trigger: "blur" }],
+  position: [{ required: true, message: "请输入职位", trigger: "blur" }],
+  phoneNum: [{ required: true, message: "请输入电话", trigger: "blur" }],
 });
 const selectConfig = computed(() => [
   {
@@ -163,12 +243,32 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "供应商类型",
+        label: "类型",
         prop: "type",
         width: 120,
       },
-      render(type) {
-        return proxy.dictKeyValue(type, supplierType.value);
+      render(val) {
+        return proxy.dictKeyValue(val, supplierType.value);
+      },
+    },
+    {
+      attrs: {
+        label: "等级",
+        prop: "grade",
+        width: 100,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, supplierGrade.value);
+      },
+    },
+    {
+      attrs: {
+        label: "状态",
+        prop: "status",
+        width: 100,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, supplierStatus.value);
       },
     },
     {
@@ -262,7 +362,8 @@ const config = computed(() => {
 });
 let formData = reactive({
   data: {
-    type: "sales",
+    type: "",
+    contactList: [],
   },
 });
 const formOption = reactive({
@@ -285,7 +386,28 @@ const formConfig = computed(() => {
       data: treeData.value,
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
-      itemWidth: 100,
+      itemWidth: 50,
+      fn: (val) => {
+        getDeptData(val);
+      },
+    },
+    {
+      type: "select",
+      prop: "devUserId",
+      label: "开发⼈员",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 50,
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "业务部门",
+      data: deptData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
     },
     {
       type: "select",
@@ -294,6 +416,25 @@ const formConfig = computed(() => {
       required: true,
       filterable: true,
       data: supplierType.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "grade",
+      label: "供应商等级",
+      required: true,
+      filterable: true,
+      data: supplierGrade.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "status",
+      label: "供应商状态",
+      required: true,
+      filterable: true,
+      data: supplierStatus.value,
+      itemWidth: 50,
     },
     {
       type: "input",
@@ -344,35 +485,174 @@ const formConfig = computed(() => {
     },
     {
       type: "title1",
-      title: "银行信息",
+      title: "其他联系人",
+    },
+    {
+      type: "slot",
+      slotName: "otherContacts",
+      label: "",
+    },
+    {
+      type: "title1",
+      title: "对公开票信息",
     },
     {
       type: "input",
       prop: "openingName",
-      label: "账户名称",
+      label: "单位名称",
+      itemType: "text",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "taxpayerCode",
+      label: "纳税⼈识别号",
       itemType: "text",
+      itemWidth: 50,
     },
+
     {
       type: "input",
       prop: "openingBank",
       label: "开户银行",
       itemType: "text",
+      itemWidth: 50,
     },
     {
       type: "input",
       prop: "accountOpening",
       label: "银行账号",
       itemType: "text",
+      itemWidth: 50,
     },
+    // {
+    //   type: "input",
+    //   prop: "interbankNumber",
+    //   label: "联行号",
+    //   itemType: "text",
+    // },
     {
       type: "input",
-      prop: "interbankNumber",
-      label: "联行号",
+      prop: "invoiceAddress",
+      label: "地址",
       itemType: "text",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "invoiceContactInfo",
+      label: "联系⽅式",
+      itemType: "text",
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "invoiceType",
+      label: "发票类型",
+      required: true,
+      filterable: true,
+      data: invoiceType.value,
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "invoiceName",
+      label: "开票名称",
+      itemType: "text",
+      itemWidth: 50,
+    },
+    {
+      type: "title1",
+      title: "对私汇款账号",
+    },
+    {
+      type: "input",
+      prop: "privOpeningName",
+      label: "账户名",
+      itemType: "text",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "privOpeningBank",
+      label: "开户⾏",
+      itemType: "text",
+      itemWidth: 50,
+    },
+
+    {
+      type: "input",
+      prop: "privAccountOpening",
+      label: "账号",
+      itemType: "text",
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "privIncludingTax",
+      label: "报价是否含税",
+      required: true,
+      filterable: true,
+      data: [
+        {
+          label: "是",
+          value: "1",
+        },
+        {
+          label: "否",
+          value: "0",
+        },
+      ],
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "privTaxPoints",
+      label: "供应商税点",
+      itemType: "text",
+      itemWidth: 50,
+    },
+    {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "licenseFileList",
+      label: "供应商营业执照附件",
     },
   ];
 });
 
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: val,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: val,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
@@ -391,9 +671,22 @@ const openModal = () => {
     type: "",
     countryId: "44",
     fileList: [],
+    contactList: [],
+    licenseFileList: [],
   };
   getCityData(formData.data.countryId, "20");
 };
+
+const clickAddPerson = () => {
+  formData.data.contactList.push({
+    name: "",
+    remark: "",
+  });
+};
+
+const clickDelete = (index) => {
+  formData.data.contactList.splice(index, 1);
+};
 const uploadFile = async (file) => {
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   uploadData.value = res.uploadBody;
@@ -430,6 +723,7 @@ const getDtl = (row) => {
   proxy.post("/supplierInfo/detail", { id: row.id }).then((res) => {
     getCityData(res.countryId, "20");
     getCityData(res.provinceId, "30");
+    getDeptData(res.companyId);
     res.type = res.type + "";
     formData.data = res;
     dialogVisible.value = true;
@@ -437,15 +731,27 @@ const getDtl = (row) => {
       .post("/fileInfo/getList", { businessIdList: [row.id] })
       .then((fileObj) => {
         if (fileObj[row.id] && fileObj[row.id].length > 0) {
-          formData.data.fileList = fileObj[row.id].map((item) => {
-            return {
-              ...item,
-              name: item.fileName,
-              url: item.fileUrl,
-            };
-          });
+          formData.data.fileList = fileObj[row.id]
+            .filter((x) => x.businessType == "0")
+            .map((item) => {
+              return {
+                ...item,
+                name: item.fileName,
+                url: item.fileUrl,
+              };
+            });
+          formData.data.licenseFileList = fileObj[row.id]
+            .filter((x) => x.businessType == "10")
+            .map((item) => {
+              return {
+                ...item,
+                name: item.fileName,
+                url: item.fileUrl,
+              };
+            });
         } else {
           formData.data.fileList = [];
+          formData.data.licenseFileList = [];
         }
       });
   });

+ 57 - 10
src/views/purchaseManage/supplier/supplyPrice/index.vue

@@ -27,11 +27,13 @@
               选择
             </el-button>
             <el-table :data="formData.data.supplierPriceList">
+              <el-table-column prop="productClassifyName" label="分类名称" width="150" />
               <el-table-column prop="customCode" label="物料编码" width="160" />
               <el-table-column prop="name" label="物料名称" min-width="150" />
               <!-- <el-table-column prop="spec" label="规格型号" /> -->
-              <el-table-column prop="unit" label="单位" :formatter="(row) => dictKeyValue(row.unit, materialUnit)" width="80" />
-              <el-table-column prop="price" label="供应单价" width="140">
+              <!-- :formatter="(row) => dictKeyValue(row.unit, materialUnit)" -->
+              <el-table-column prop="unit" label="单位" width="80" />
+              <el-table-column prop="price" label="单价(不含税)" width="140">
                 <template #default="{ row, $index }">
                   <el-form-item label-width="0px" label="" :prop="'supplierPriceList.' + $index + '.price'" :rules="rules.price"
                                 :inline-message="true" class="margin-b-0 wid100">
@@ -39,6 +41,14 @@
                   </el-form-item>
                 </template>
               </el-table-column>
+              <el-table-column prop="price" label="单价(含税)" width="140">
+                <template #default="{ row, $index }">
+                  <el-form-item label-width="0px" label="" :prop="'supplierPriceList.' + $index + '.includingTaxPrice'"
+                                :rules="rules.includingTaxPrice" :inline-message="true" class="margin-b-0 wid100">
+                    <el-input-number v-model="row.includingTaxPrice" :precision="2" :controls="false" :min="0.01" onmousewheel="return false;" />
+                  </el-form-item>
+                </template>
+              </el-table-column>
 
               <el-table-column prop="zip" label="操作" width="60" v-if="modalType == 'add'">
                 <template #default="{ $index }">
@@ -104,7 +114,12 @@ let rules = ref({
   supplierInfoId: [
     { required: true, message: "请选择供应商", trigger: "change" },
   ],
-  price: [{ required: true, message: "请输入供应单价", trigger: "blur" }],
+  price: [
+    { required: true, message: "请输入供应单价(不含税)", trigger: "blur" },
+  ],
+  includingTaxPrice: [
+    { required: true, message: "请输入供应单价(含税)", trigger: "blur" },
+  ],
 });
 
 const selectConfig = computed(() => [
@@ -172,9 +187,9 @@ const config = computed(() => {
         prop: "productUnit",
         width: 80,
       },
-      render(unit) {
-        return proxy.dictKeyValue(unit, materialUnit.value);
-      },
+      // render(unit) {
+      //   return proxy.dictKeyValue(unit, materialUnit.value);
+      // },
     },
     {
       attrs: {
@@ -195,8 +210,15 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "供应单价",
+        label: "单价(不含税)",
         prop: "price",
+        width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "单价(含税)",
+        prop: "includingTaxPrice",
         width: 110,
       },
     },
@@ -266,7 +288,7 @@ const formData = reactive({
 });
 const formOption = reactive({
   inline: true,
-  labelWidth: 100,
+  labelWidth: 120,
   itemWidth: 100,
 });
 const byform = ref(null);
@@ -287,6 +309,15 @@ const formConfig = computed(() => [
     required: true,
     isShow: modalType.value == "add",
   },
+
+  {
+    type: "input",
+    prop: "productClassifyName",
+    label: "分类名称",
+    disabled: true,
+    isShow: modalType.value == "edit",
+    itemWidth: 50,
+  },
   {
     type: "input",
     prop: "code",
@@ -316,7 +347,17 @@ const formConfig = computed(() => [
   {
     type: "number",
     prop: "price",
-    label: "单价",
+    label: "单价(不含税)",
+    precision: 2,
+    min: 0.01,
+    controls: false,
+    itemWidth: 50,
+    isShow: modalType.value == "edit",
+  },
+  {
+    type: "number",
+    prop: "includingTaxPrice",
+    label: "单价(含税)",
     precision: 2,
     min: 0.01,
     controls: false,
@@ -353,6 +394,7 @@ const submitForm = () => {
           supplierPriceList: formData.data.supplierPriceList.map((x) => ({
             productInfoId: x.productInfoId,
             price: x.price,
+            includingTaxPrice: x.includingTaxPrice,
           })),
         };
         submitLoading.value = true;
@@ -450,13 +492,16 @@ const getDtl = (row) => {
         code: row.productCode,
         unit: row.productUnit,
         price: row.price,
+        includingTaxPrice: row.includingTaxPrice,
       },
     ],
     productInfoId: row.productInfoId,
+    productClassifyName: row.productClassifyName,
     name: row.productName,
     code: row.productCode,
     unit: row.productUnit,
     price: row.price,
+    includingTaxPrice: row.includingTaxPrice,
   };
 };
 
@@ -487,7 +532,9 @@ const selectMaterial = (row) => {
     formData.data.supplierPriceList.push({
       ...row,
       productInfoId: row.id,
-      price: "",
+      price: null,
+      includingTaxPrice: null,
+      productClassifyName: row.classifyName,
     });
     proxy.msgTip("选择成功");
   } else {

+ 1 - 1
src/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index.vue

@@ -179,7 +179,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "尺寸 (cm)",
+        label: "规格尺寸 (cm)",
         slot: "size",
         width: 120,
       },

+ 1 - 1
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -33,7 +33,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="编码" width="160" />
               <el-table-column prop="productName" label="名称" min-width="160" />
-              <el-table-column label="尺寸 (cm)" min-width="100">
+              <el-table-column label="规格尺寸 (cm)" min-width="100">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 1 - 1
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -33,7 +33,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="编码" width="160" />
               <el-table-column prop="productName" label="名称" min-width="220" />
-              <el-table-column label="尺寸 (cm)" min-width="160">
+              <el-table-column label="规格尺寸 (cm)" min-width="160">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 81 - 15
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -23,7 +23,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="物品编码" width="200" />
               <el-table-column prop="productName" label="物品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
+              <el-table-column label="规格尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -40,7 +40,7 @@
       </byTable>
     </div>
 
-    <el-dialog title="出库" v-if="dialogVisible" v-model="dialogVisible" width="1200">
+    <el-dialog title="出库" v-if="dialogVisible" v-model="dialogVisible" width="90%">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
         <template #detail>
           <div style="width:100%">
@@ -53,21 +53,26 @@
                     </div>
                   </template>
                 </el-table-column>
-                <el-table-column prop="productCode" label="物品编码" width="160" />
-                <el-table-column prop="productName" label="物品名称" min-width="130" />
-                <el-table-column label="尺寸 (cm)" width="140">
+                <!-- <el-table-column prop="productName" label="物品分类" width="150" /> -->
+                <el-table-column prop="productCode" label="物品编码" min-width="160" />
+                <el-table-column prop="productName" label="物品名称" width="150" />
+                <el-table-column label="规格尺寸 (cm)" width="140">
                   <template #default="{ row, $index }">
                     <div style="width: 100%">
                       {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
                     </div>
                   </template>
                 </el-table-column>
-
-                <el-table-column label="可用库存" prop="availableQuantity" width="100" />
-                <el-table-column label="需出库数量" prop="needQuantity" width="100" />
-                <el-table-column label="待出库数量" prop="waitQuantity" width="100" />
-                <el-table-column label="已出库数量" prop="receiptQuantity" width="100" />
-                <el-table-column prop="quantity" label="出库数量" width="130">
+                <el-table-column prop="productColor" label="颜色" width="130" />
+                <el-table-column prop="productNetWeight" label="净重" width="100" />
+                <el-table-column prop="productFrontalTexture" label="纹路" width="130"
+                                 :formatter="(row) => dictKeyValue(row.productFrontalTexture, frontLinesData)" />
+                <el-table-column prop="productUnit" label="单位" width="100" />
+                <el-table-column label="可用库存" prop="availableQuantity" width="100" fixed="right" />
+                <el-table-column label="需出库数量" prop="needQuantity" width="100" fixed="right" />
+                <el-table-column label="待出库数量" prop="waitQuantity" width="100" fixed="right" />
+                <el-table-column label="已出库数量" prop="receiptQuantity" width="100" fixed="right" />
+                <el-table-column prop="quantity" label="出库数量" width="130" fixed="right">
                   <template #default="{ row, $index }">
                     <el-form-item :prop="'stockWaitDetailsList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
                                   class="margin-b-0">
@@ -101,6 +106,9 @@ const productType = ref([]);
 const materialUnitData = computed(
   () => proxy.useUserStore().allDict["material_unit"]
 );
+const frontLinesData = computed(
+  () => proxy.useUserStore().allDict["front_lines"]
+);
 const status = ref([
   {
     label: "待出库",
@@ -404,7 +412,7 @@ const formConfig = computed(() => {
       label: "数据来源",
       disabled: true,
       data: businessType.value,
-      itemWidth: 50,
+      itemWidth: 25,
     },
     {
       type: "input",
@@ -412,7 +420,65 @@ const formConfig = computed(() => {
       label: "单号",
       itemType: "text",
       disabled: true,
-      itemWidth: 50,
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "aa",
+      label: "订单类型",
+      disabled: true,
+      data: [
+        {
+          dictKey: "3",
+          dictValue: "打样订单",
+        },
+        {
+          dictKey: "2",
+          dictValue: "内销订单",
+        },
+        {
+          dictKey: "1",
+          dictValue: "外贸订单(退税)",
+        },
+        {
+          dictKey: "4",
+          dictValue: "外贸订单(不退税)",
+        },
+      ],
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "ww",
+      label: "客户名称",
+      itemType: "text",
+      disabled: true,
+      itemWidth: 25,
+    },
+
+    {
+      type: "input",
+      prop: "ww",
+      label: "跟单员",
+      itemType: "text",
+      disabled: true,
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "ww",
+      label: "业务员",
+      itemType: "text",
+      disabled: true,
+      itemWidth: 25,
+    },
+    {
+      type: "date",
+      prop: "subcribeTime",
+      itemType: "date",
+      label: "申请日期",
+      itemWidth: 25,
+      disabled: false,
     },
     {
       type: "treeSelect",
@@ -421,7 +487,7 @@ const formConfig = computed(() => {
       data: proxy.useUserStore().allDict["tree_company_data"],
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
-      itemWidth: 50,
+      itemWidth: 25,
       disabled: true,
     },
     {
@@ -430,7 +496,7 @@ const formConfig = computed(() => {
       label: "仓库名称",
       required: true,
       data: warehouseList.value,
-      itemWidth: 50,
+      itemWidth: 25,
     },
     {
       type: "upload",

+ 118 - 26
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -16,7 +16,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="物品编码" width="200" />
               <el-table-column prop="productName" label="物品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
+              <el-table-column label="规格尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -32,7 +32,7 @@
       </byTable>
     </div>
 
-    <el-dialog title="入库" v-if="dialogVisible" v-model="dialogVisible" width="1200">
+    <el-dialog title="入库" v-if="dialogVisible" v-model="dialogVisible" width="90%">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
         <template #detail>
           <div style="width:100%">
@@ -45,19 +45,24 @@
                     </div>
                   </template>
                 </el-table-column>
-                <el-table-column prop="productCode" label="物品编码" width="160" />
-                <el-table-column prop="productName" label="物品名称" min-width="130" />
-                <el-table-column label="尺寸 (cm)" width="140">
+                <el-table-column prop="productCode" label="物品编码" min-width="160" />
+                <el-table-column prop="productName" label="物品名称" width="150" />
+                <el-table-column label="规格尺寸 (cm)" width="140">
                   <template #default="{ row, $index }">
                     <div style="width: 100%">
                       {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
                     </div>
                   </template>
                 </el-table-column>
-                <el-table-column label="需入库数量" prop="needQuantity" width="100" />
-                <el-table-column label="待入库数量" prop="waitQuantity" width="100" />
-                <el-table-column label="已入库数量" prop="receiptQuantity" width="100" />
-                <el-table-column prop="quantity" label="入库数量" width="130">
+                <el-table-column prop="productColor" label="颜色" width="130" />
+                <el-table-column prop="productNetWeight" label="净重" width="100" />
+                <el-table-column prop="productFrontalTexture" label="纹路" width="130"
+                                 :formatter="(row) => dictKeyValue(row.productFrontalTexture, frontLinesData)" />
+                <el-table-column prop="productUnit" label="单位" width="100" />
+                <el-table-column label="需入库数量" prop="needQuantity" width="100" fixed="right" />
+                <el-table-column label="待入库数量" prop="waitQuantity" width="100" fixed="right" />
+                <el-table-column label="已入库数量" prop="receiptQuantity" width="100" fixed="right" />
+                <el-table-column prop="quantity" label="入库数量" width="130" fixed="right">
                   <template #default="{ row, $index }">
                     <el-form-item :prop="'stockWaitDetailsList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
                                   class="margin-b-0">
@@ -84,12 +89,18 @@ import { computed, ref } from "vue";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import { ElMessage } from "element-plus";
+import moment from "moment";
 
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
+const userList = ref([]);
+const deptData = ref([]);
 const materialUnitData = computed(
   () => proxy.useUserStore().allDict["material_unit"]
 );
+const frontLinesData = computed(
+  () => proxy.useUserStore().allDict["front_lines"]
+);
 const status = ref([
   {
     label: "待入库",
@@ -316,18 +327,7 @@ const config = computed(() => {
     },
   ];
 });
-const getDict = () => {
-  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      warehouseList.value = res.rows.map((item) => {
-        return {
-          label: item.name,
-          value: item.id,
-        };
-      });
-    }
-  });
-};
+
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
@@ -372,7 +372,6 @@ const getList = async (req) => {
     }, 200);
   });
 };
-getDict();
 getList();
 const dialogVisible = ref(false);
 const loadingDialog = ref(false);
@@ -398,7 +397,7 @@ const formConfig = computed(() => {
       label: "数据来源",
       disabled: true,
       data: businessType.value,
-      itemWidth: 50,
+      itemWidth: 25,
     },
     {
       type: "input",
@@ -406,7 +405,23 @@ const formConfig = computed(() => {
       label: "单号",
       itemType: "text",
       disabled: true,
-      itemWidth: 50,
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "businessCode",
+      label: "采购员",
+      itemType: "text",
+      disabled: true,
+      itemWidth: 25,
+    },
+    {
+      type: "date",
+      prop: "subcribeTime",
+      itemType: "date",
+      label: "入库日期",
+      itemWidth: 25,
+      disabled: false,
     },
     {
       type: "treeSelect",
@@ -415,16 +430,34 @@ const formConfig = computed(() => {
       data: proxy.useUserStore().allDict["tree_company_data"],
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
-      itemWidth: 50,
+      itemWidth: 25,
       disabled: true,
     },
     {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "业务部门",
+      data: deptData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "userId",
+      label: "入库员",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 25,
+    },
+    {
       type: "select",
       prop: "warehouseId",
       label: "仓库名称",
       required: true,
       data: warehouseList.value,
-      itemWidth: 50,
+      itemWidth: 25,
     },
     {
       type: "upload",
@@ -453,6 +486,11 @@ const rules = ref({
   fileList: [
     { required: true, message: "请上传凭证", trigger: ["blur", "change"] },
   ],
+  subcribeTime: [
+    { required: true, message: "请选择入库日期", trigger: "change" },
+  ],
+  deptId: [{ required: true, message: "请选择业务部门", trigger: "change" }],
+  userId: [{ required: true, message: "请选择入库员", trigger: "change" }],
 });
 const submitForm = () => {
   submit.value.handleSubmit(() => {
@@ -478,7 +516,59 @@ const submitForm = () => {
     );
   });
 };
+
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: val,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: val,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+
+  proxy
+    .post("/warehouse/page", {
+      pageNum: 1,
+      pageSize: 999,
+      companyId: val,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        warehouseList.value = res.rows.map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
+};
+
 const clickOperation = (row) => {
+  if (row.companyId) {
+    getDeptData(row.companyId);
+  }
   formData.data = {
     id: row.id,
     companyId: row.companyId,
@@ -491,6 +581,8 @@ const clickOperation = (row) => {
       quantity: null,
     })),
     fileList: [],
+    subcribeTime: moment().format("YYYY-MM-DD"),
+    userId: proxy.useUserStore().user.userId,
   };
   loadingDialog.value = false;
   dialogVisible.value = true;

+ 1 - 1
src/views/salesMange/afterSales/SelectContractProduct.vue

@@ -224,7 +224,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "尺寸 (cm)",
+        label: "规格尺寸 (cm)",
         slot: "size",
         width: 130,
       },

+ 2 - 2
src/views/salesMange/afterSales/index.vue

@@ -185,7 +185,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "尺寸 (cm)",
+        label: "规格尺寸 (cm)",
         slot: "size",
         width: 130,
       },
@@ -290,7 +290,7 @@ const formConfig = computed(() => {
       type: "input",
       itemType: "text",
       prop: "size",
-      label: "尺寸 (cm)",
+      label: "规格尺寸 (cm)",
       itemWidth: 50,
       disabled: true,
     },

+ 1 - 1
src/views/system/user/profile/index.vue

@@ -26,7 +26,7 @@
                         <div class="pull-right">{{ state.user.email }}</div>
                      </li>
                      <li class="list-group-item">
-                        <svg-icon icon-class="tree" />所属部门
+                        <svg-icon icon-class="tree" />业务部门
                         <div class="pull-right" v-if="state.user.dept">{{ state.user.dept.deptName }} / {{ state.postGroup }}</div>
                      </li>
                      <li class="list-group-item">