فهرست منبع

销售订单、报价单功能同步web

cz 1 سال پیش
والد
کامیت
4696fb639f

+ 3 - 3
.env.prod

@@ -10,10 +10,10 @@ VUE_APP_BASE_API = '/prod-api'
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VUE_APP_COMPRESS = gzip
 
-VUE_APP_WS_API = ':9900/prod-api'
+VUE_APP_WS_API = ':20011/prod-api'
 
-VUE_APP_IP = '139.9.102.170'
+VUE_APP_IP = '175.178.26.5'
 
 #上传文件地址
-VUE_APP_UPLOAD_API='121.37.194.75:20010'
+VUE_APP_UPLOAD_API='175.178.26.5:20011'
 VUE_APP_UPLOAD_BASE_API = '/test-api'

+ 284 - 221
src/views/processApproval/components/EhsdContract.vue

@@ -2,9 +2,9 @@
   <div class="form">
     <van-tabs v-model:active="active">
       <van-tab :title="proxy.t('contract.transactionInformation')" />
-      <van-tab title="款信息" />
+      <van-tab title="款信息" />
       <van-tab :title="proxy.t('contract.commodityInformation')" />
-      <van-tab :title="proxy.t('contract.otherCharges')" />
+      <van-tab :title="'订单总金额'" />
 
       <div class="common-process-card" v-show="active == 0">
 
@@ -26,7 +26,7 @@
           <template #input>
             <div class="_title">
               <div class="line"></div>
-              <div> 款信息</div>
+              <div> 款信息</div>
             </div>
           </template>
         </van-field>
@@ -53,16 +53,16 @@
           <div class="line"></div>
           <div> 其他收费</div>
         </div> -->
-        <van-field style="border-bottom:1px solid #0084ff;width:45%">
+        <!-- <van-field style="border-bottom:1px solid #0084ff;width:45%">
           <template #input>
             <div class="_title">
               <div class="line"></div>
               <div> 其他收费</div>
             </div>
           </template>
-        </van-field>
-        <testForm v-model="formData.data" :formOption="formProjectOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom4">
-        </testForm>
+        </van-field> -->
+        <!-- <testForm v-model="formData.data" :formOption="formProjectOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom4">
+        </testForm> -->
         <testForm v-model="formData.data" :formOption="formOption" :formConfig="formAmountProjectConfig" :rules="rules" ref="formDom5">
           <template #templateContent>
             <div style="width:100%">
@@ -134,7 +134,7 @@ const formConfigCode = reactive([
   },
   {
     type: "input",
-    label: "合同号",
+    label: "订单号",
     prop: "code",
     itemType: "text",
     readonly: true,
@@ -182,17 +182,38 @@ const formConfigCode = reactive([
       },
     ],
   },
+  // {
+  //   type: "cascader",
+  //   label: "工厂",
+  //   prop: "companyId",
+  //   itemType: "common",
+  //   showPicker: false,
+  //   fieldNames: {
+  //     text: "deptName",
+  //     value: "deptId",
+  //   },
+  //   data: [],
+  // },
   {
-    type: "cascader",
-    label: "工厂",
-    prop: "companyId",
-    itemType: "common",
+    type: "picker",
+    label: "订单处理方式",
+    prop: "processingMethod",
+    itemType: "onePicker",
     showPicker: false,
     fieldNames: {
-      text: "deptName",
-      value: "deptId",
+      text: "dictValue",
+      value: "dictKey",
     },
-    data: [],
+    data: [
+      {
+        dictKey: 10,
+        dictValue: "业务自采",
+      },
+      {
+        dictKey: 20,
+        dictValue: "生产处理",
+      },
+    ],
   },
   {
     type: "picker",
@@ -217,6 +238,37 @@ const formConfigCode = reactive([
   },
   {
     type: "picker",
+    label: "订单渠道",
+    prop: "contractChannel",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "dictValue",
+      value: "dictKey",
+    },
+    data: [],
+  },
+  {
+    type: "input",
+    label: "渠道订单编号",
+    prop: "channelCode",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "picker",
+    label: "业务员",
+    prop: "salesmanId",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "text",
+      value: "value",
+    },
+    data: [],
+  },
+  {
+    type: "picker",
     label: "跟单员",
     prop: "merchUserId",
     itemType: "onePicker",
@@ -389,26 +441,6 @@ const formConfig = reactive([
   },
 ]);
 const formConfigOne = reactive([
-  // {
-  //   type: "picker",
-  //   label: "币种",
-  //   prop: "currency",
-  //   itemType: "onePicker",
-  //   showPicker: false,
-  //   fieldNames: {
-  //     text: "label",
-  //     value: "value",
-  //   },
-  //   data: [],
-  //   readonly: false,
-  // },
-  // {
-  //   type: "input",
-  //   label: "汇率",
-  //   prop: "rate",
-  //   itemType: "number",
-  //   readonly: false,
-  // },
   {
     type: "picker",
     label: "是否含税",
@@ -433,6 +465,19 @@ const formConfigOne = reactive([
   },
   {
     type: "picker",
+    label: "税点",
+    prop: "taxPoints",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "dictValue",
+      value: "dictKey",
+    },
+    data: [],
+    readonly: false,
+  },
+  {
+    type: "picker",
     label: "是否含运费",
     prop: "isFreight",
     itemType: "onePicker",
@@ -455,32 +500,53 @@ const formConfigOne = reactive([
   },
   {
     type: "picker",
-    label: "付款方式",
-    prop: "paymentMethod",
+    label: "客户结算方式",
+    prop: "settlementMethod",
     itemType: "onePicker",
     showPicker: false,
     fieldNames: {
-      text: "label",
-      value: "value",
+      text: "dictValue",
+      value: "dictKey",
     },
     data: [],
     readonly: false,
   },
   {
-    type: "input",
-    label: "预付款比例(%)",
-    prop: "advanceRatio",
-    itemType: "number",
+    type: "picker",
+    label: "客户付款方式",
+    prop: "paymentMethod",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "dictValue",
+      value: "dictKey",
+    },
+    data: [],
     readonly: false,
   },
   {
     type: "input",
-    label: "付款条件",
-    prop: "remark",
-    itemType: "textarea",
+    label: "阿里巴巴订单编号",
+    prop: "alibabaCode",
+    itemType: "text",
+    readonly: true,
   },
   {
     type: "picker",
+    label: "1688店铺名称",
+    prop: "alibabaShopName",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "label",
+      value: "value",
+    },
+    data: [],
+    readonly: false,
+  },
+
+  {
+    type: "picker",
     label: "收款账号",
     prop: "shroffAccountId",
     itemType: "onePicker",
@@ -524,50 +590,42 @@ const formConfigOne = reactive([
     prop: "accountOpening",
     itemType: "text",
   },
-  // {
-  //   type: "input",
-  //   label: "Beneficiary Name",
-  //   prop: "beneficiaryName",
-  //   itemType: "text",
-  // },
-  // {
-  //   type: "input",
-  //   label: "Beneficiary Account Number",
-  //   prop: "beneficiaryAccountNumber",
-  //   itemType: "text",
-  // },
-  // {
-  //   type: "input",
-  //   label: "Beneficiary Bank",
-  //   prop: "beneficiaryBank",
-  //   itemType: "text",
-  // },
-  // {
-  //   type: "input",
-  //   label: "Swift Code",
-  //   prop: "swiftCode",
-  //   itemType: "text",
-  // },
-  // {
-  //   type: "input",
-  //   label: "Beneficiary Bank Address",
-  //   prop: "beneficiaryBankAddress",
-  //   itemType: "text",
-  // },
-  // {
-  //   type: "input",
-  //   label: "Beneficiary Address",
-  //   prop: "beneficiaryAddress",
-  //   itemType: "text",
-  // },
+
+  {
+    type: "input",
+    label: "其他收款方式备注说明",
+    prop: "remark",
+    itemType: "textarea",
+  },
+  {
+    type: "input",
+    label: "定金比例(%)",
+    prop: "advanceRatio",
+    itemType: "number",
+    readonly: false,
+  },
+  {
+    type: "input",
+    label: "出货前付款比例",
+    prop: "beforeShipmentRatio",
+    itemType: "number",
+    readonly: false,
+  },
+  {
+    type: "input",
+    label: "出货后付款比例",
+    prop: "afterShipmentRatio",
+    itemType: "number",
+    readonly: false,
+  },
   {
     type: "title",
     title: "交付信息",
   },
   {
     type: "picker",
-    label: "交货期限",
-    prop: "deliveryTime",
+    label: "销售日期",
+    prop: "saleDate",
     itemType: "datePicker",
     showPicker: false,
     split: "-",
@@ -575,23 +633,13 @@ const formConfigOne = reactive([
   },
   {
     type: "picker",
-    label: "运输方式",
-    prop: "transportMethod",
-    itemType: "onePicker",
+    label: "交货期限",
+    prop: "deliveryTime",
+    itemType: "datePicker",
     showPicker: false,
-    fieldNames: {
-      text: "label",
-      value: "value",
-    },
-    data: [],
-    readonly: false,
+    split: "-",
+    columnsType: ["year", "month", "day"],
   },
-  // {
-  //   type: "input",
-  //   label: "运输说明",
-  //   prop: "transportRemark",
-  //   itemType: "text",
-  // },
 ]);
 const formGoodsOption = reactive({
   readonly: false,
@@ -618,70 +666,6 @@ const formGoodsOption = reactive({
           value: "id",
         },
         data: [],
-        changeFn: (val, data, index, indexTwo, propName) => {
-          let selectList = formData.data[propName].filter(
-            (item, itemIndex) =>
-              item[data.prop] === val.selectedValues[0] && itemIndex !== index
-          );
-          if (selectList && selectList.length > 0) {
-            return showFailToast(proxy.t("contract.productRepeat"));
-          }
-          formData.data[propName][index][data.prop] = val.selectedValues[0];
-          formData.data.contractShipmentList[index][data.prop] =
-            val.selectedValues[0];
-          let list = data.data.filter(
-            (item) => item[data.fieldNames.value] == val.selectedValues[0]
-          );
-          if (list && list.length > 0) {
-            formData.data[propName][index][data.prop + "Name"] =
-              list[0][data.fieldNames.text];
-            if (list[0].ehsdJson) {
-              let ehsdJson = JSON.parse(list[0].ehsdJson);
-              if (ehsdJson) {
-                formData.data[propName][index].productName =
-                  ehsdJson.nameEnglish || "";
-                formData.data.contractShipmentList[index].productName =
-                  ehsdJson.nameEnglish || list[0][data.fieldNames.text];
-                formData.data.contractShipmentList[index].productCode =
-                  list[0].code;
-                formData.data[propName][index].productModel =
-                  ehsdJson.productLong +
-                  "*" +
-                  ehsdJson.productWide +
-                  "*" +
-                  ehsdJson.productHigh;
-                // 包装方式
-                let str = "";
-                let strOne = "";
-                if (ehsdJson.innerPackMethod) {
-                  let innerPackMethodArr = ehsdJson.innerPackMethod.split(",");
-                  innerPackMethodArr = innerPackMethodArr.map((x) =>
-                    proxy.dictValueLabel(x, innerMethod.value)
-                  );
-                  str += innerPackMethodArr.join(",");
-                }
-                if (ehsdJson.outerPackMethod) {
-                  let outerPackMethodArr = ehsdJson.outerPackMethod.split(",");
-                  outerPackMethodArr = outerPackMethodArr.map((x) =>
-                    proxy.dictValueLabel(x, outsideMethod.value)
-                  );
-                  strOne += outerPackMethodArr.join(",");
-                }
-                formData.data[propName][index].packMethod = str + "," + strOne;
-              }
-            }
-          } else {
-            formData.data[propName][index][data.prop + "Name"] = "";
-          }
-          formData.data[propName][index].quantity = null;
-          formData.data[propName][index].price = null;
-          formData.data[propName][index].amount = null;
-          formData.data[propName][index].remark = null;
-          formData.data.contractShipmentList[index].shipmentTime = null;
-          formData.data.contractShipmentList[index].quantity = null;
-          formData.data.contractShipmentList[index].remark = null;
-          data.showPicker = false;
-        },
       },
       {
         type: "input",
@@ -697,6 +681,37 @@ const formGoodsOption = reactive({
       },
       {
         type: "input",
+        label: "颜色",
+        prop: "productColor",
+        itemType: "text",
+      },
+      {
+        type: "picker",
+        label: "纹路",
+        prop: "productFrontalTexture",
+        itemType: "onePicker",
+        showPicker: false,
+        readonly: false,
+        fieldNames: {
+          text: "dictValue",
+          value: "dictKey",
+        },
+        data: [],
+      },
+      {
+        type: "input",
+        label: "净重",
+        prop: "productNetWeight",
+        itemType: "text",
+      },
+      {
+        type: "input",
+        label: "单位",
+        prop: "productUnit",
+        itemType: "text",
+      },
+      {
+        type: "input",
         label: "数量",
         prop: "quantity",
         itemType: "number",
@@ -715,7 +730,14 @@ const formGoodsOption = reactive({
       },
       {
         type: "input",
-        label: "金额",
+        label: "业务供货价",
+        prop: "businessCostPrice",
+        itemType: "number",
+        changeFn: () => {},
+      },
+      {
+        type: "input",
+        label: "小计",
         prop: "amount",
         itemType: "number",
         changeFn: () => {
@@ -724,6 +746,13 @@ const formGoodsOption = reactive({
       },
       {
         type: "input",
+        label: "业务小计",
+        prop: "amountTwo",
+        itemType: "number",
+        changeFn: () => {},
+      },
+      {
+        type: "input",
         label: "备注",
         prop: "remark",
         itemType: "textarea",
@@ -787,11 +816,36 @@ const formEmptyConfig = reactive([]);
 const formAmountProjectConfig = reactive([
   {
     type: "title",
-    title: "合同模板",
+    title: "订单总金额",
+  },
+  {
+    type: "input",
+    label: "订单总金额",
+    prop: "amount",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "业务总⾦额",
+    prop: "factoryAmount",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "合计⽑利",
+    prop: "grossProfit",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "title",
+    title: "合同条款",
   },
   {
     type: "picker",
-    label: "合同模板",
+    label: "合同条款",
     prop: "contractTemplateId",
     itemType: "onePicker",
     showPicker: false,
@@ -807,17 +861,6 @@ const formAmountProjectConfig = reactive([
     slotName: "templateContent",
     label: "模板内容",
   },
-  {
-    type: "title",
-    title: "合同总金额",
-  },
-  {
-    type: "input",
-    label: "合同总金额",
-    prop: "amount",
-    itemType: "text",
-    readonly: true,
-  },
 ]);
 const formProjectOption = reactive({
   readonly: false,
@@ -977,13 +1020,22 @@ const getDict = () => {
     tenantId: getUserInfo().tenantId,
   };
 
+  // proxy
+  //   .get("/tenantDept/list", {
+  //     ...query,
+  //     type: 0,
+  //   })
+  //   .then((res) => {
+  //     formConfigCode[5].data = proxy.handleTree(res.data, "deptId");
+  //   });
+
+  // 订单渠道
   proxy
-    .get("/tenantDept/list", {
-      ...query,
-      type: 0,
-    })
+    .post("/dictTenantData/page", { ...query, dictCode: "contract_channel" })
     .then((res) => {
-      formConfigCode[5].data = proxy.handleTree(res.data, "deptId");
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfigCode[7].data = res.data.rows;
+      }
     });
 
   proxy
@@ -994,7 +1046,13 @@ const getDict = () => {
     })
     .then((res) => {
       if (res.rows && res.rows.length > 0) {
-        formConfigCode[7].data = res.rows.map((item) => {
+        formConfigCode[9].data = res.rows.map((item) => {
+          return {
+            text: item.nickName,
+            value: item.userId,
+          };
+        });
+        formConfigCode[10].data = res.rows.map((item) => {
           return {
             text: item.nickName,
             value: item.userId,
@@ -1038,20 +1096,34 @@ const getDict = () => {
     .then((res) => {
       formGoodsOption.btnConfig.listConfig[0].data = res.data.rows;
     });
+  // 纹路
+
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "front_lines" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formGoodsOption.btnConfig.listConfig[4].data = res.data.rows;
+      }
+    });
+
+  // 税点
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "tax_points" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfigOne[1].data = res.data.rows;
+      }
+    });
+
+  // 结算方式
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "settlement_way" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfigOne[3].data = res.data.rows;
+      }
+    });
 
-  // 币种
-  // proxy
-  //   .post("/dictTenantData/page", { ...query, dictCode: "account_currency" })
-  //   .then((res) => {
-  //     if (res.data.rows && res.data.rows.length > 0) {
-  //       formConfigOne[0].data = res.data.rows.map((item) => {
-  //         return {
-  //           label: item.dictValue,
-  //           value: item.dictKey,
-  //         };
-  //       });
-  //     }
-  //   });
   // 付款方式
   proxy
     .post("/dictTenantData/page", {
@@ -1060,21 +1132,27 @@ const getDict = () => {
     })
     .then((res) => {
       if (res.data.rows && res.data.rows.length > 0) {
-        formConfigOne[2].data = res.data.rows.map((item) => {
-          return {
-            label: item.dictValue,
-            value: item.dictKey,
-          };
-        });
+        formConfigOne[4].data = res.data.rows;
       }
     });
 
+  // 店铺名称
+  proxy
+    .post("/dictTenantData/page", {
+      ...query,
+      dictCode: "shop_name",
+    })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfigOne[6].data = res.data.rows;
+      }
+    });
   // 账户
   proxy
     .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
     .then((res) => {
       if (res.data.rows && res.data.rows.length > 0) {
-        formConfigOne[5].data = res.data.rows.map((item) => {
+        formConfigOne[7].data = res.data.rows.map((item) => {
           return {
             ...item,
             label: item.alias,
@@ -1084,23 +1162,7 @@ const getDict = () => {
       }
     });
 
-  // 运输方式
-  proxy
-    .post("/dictTenantData/page", {
-      ...query,
-      dictCode: "shipping_method",
-    })
-    .then((res) => {
-      if (res.data.rows && res.data.rows.length > 0) {
-        formConfigOne[11].data = res.data.rows.map((item) => {
-          return {
-            label: item.dictValue,
-            value: item.dictKey,
-          };
-        });
-      }
-    });
-  // 合同模板
+  // 合同条款
   proxy
     .post("/contractTemplate/page", {
       pageNum: 1,
@@ -1108,7 +1170,7 @@ const getDict = () => {
       templateType: "1",
     })
     .then((res) => {
-      formAmountProjectConfig[1].data = res.data.rows.map((x) => ({
+      formAmountProjectConfig[5].data = res.data.rows.map((x) => ({
         label: x.templateName,
         value: x.id,
       }));
@@ -1259,6 +1321,7 @@ onMounted(() => {
   if (route.query && route.query.businessId) {
     let businessId = route.query.businessId;
     proxy.post("/contract/detail", { id: businessId }).then((res) => {
+      res.data.isTax = res.data.isTax + "";
       res.data.countryId = res.data.buyCountryId;
       res.data.provinceId = res.data.buyProvinceId;
       res.data.cityId = res.data.buyCityId;

+ 297 - 229
src/views/processApproval/components/EhsdContractChange.vue

@@ -2,9 +2,9 @@
   <div class="form">
     <van-tabs v-model:active="active">
       <van-tab :title="proxy.t('contract.transactionInformation')" />
-      <van-tab title="款信息" />
+      <van-tab title="款信息" />
       <van-tab :title="proxy.t('contract.commodityInformation')" />
-      <van-tab :title="proxy.t('contract.otherCharges')" />
+      <van-tab :title="'订单总金额'" />
 
       <div class="common-process-card" v-show="active == 0">
 
@@ -26,7 +26,7 @@
           <template #input>
             <div class="_title">
               <div class="line"></div>
-              <div> 款信息</div>
+              <div> 款信息</div>
             </div>
           </template>
         </van-field>
@@ -53,16 +53,16 @@
           <div class="line"></div>
           <div> 其他收费</div>
         </div> -->
-        <van-field style="border-bottom:1px solid #0084ff;width:45%">
+        <!-- <van-field style="border-bottom:1px solid #0084ff;width:45%">
           <template #input>
             <div class="_title">
               <div class="line"></div>
               <div> 其他收费</div>
             </div>
           </template>
-        </van-field>
-        <testForm v-model="formData.data" :formOption="formProjectOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom4">
-        </testForm>
+        </van-field> -->
+        <!-- <testForm v-model="formData.data" :formOption="formProjectOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom4">
+        </testForm> -->
         <testForm v-model="formData.data" :formOption="formOption" :formConfig="formAmountProjectConfig" :rules="rules" ref="formDom5">
           <template #templateContent>
             <div style="width:100%">
@@ -134,7 +134,7 @@ const formConfigCode = reactive([
   },
   {
     type: "input",
-    label: "合同号",
+    label: "订单号",
     prop: "code",
     itemType: "text",
     readonly: true,
@@ -182,17 +182,38 @@ const formConfigCode = reactive([
       },
     ],
   },
+  // {
+  //   type: "cascader",
+  //   label: "工厂",
+  //   prop: "companyId",
+  //   itemType: "common",
+  //   showPicker: false,
+  //   fieldNames: {
+  //     text: "deptName",
+  //     value: "deptId",
+  //   },
+  //   data: [],
+  // },
   {
-    type: "cascader",
-    label: "工厂",
-    prop: "companyId",
-    itemType: "common",
+    type: "picker",
+    label: "订单处理方式",
+    prop: "processingMethod",
+    itemType: "onePicker",
     showPicker: false,
     fieldNames: {
-      text: "deptName",
-      value: "deptId",
+      text: "dictValue",
+      value: "dictKey",
     },
-    data: [],
+    data: [
+      {
+        dictKey: 10,
+        dictValue: "业务自采",
+      },
+      {
+        dictKey: 20,
+        dictValue: "生产处理",
+      },
+    ],
   },
   {
     type: "picker",
@@ -217,6 +238,37 @@ const formConfigCode = reactive([
   },
   {
     type: "picker",
+    label: "订单渠道",
+    prop: "contractChannel",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "dictValue",
+      value: "dictKey",
+    },
+    data: [],
+  },
+  {
+    type: "input",
+    label: "渠道订单编号",
+    prop: "channelCode",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "picker",
+    label: "业务员",
+    prop: "salesmanId",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "text",
+      value: "value",
+    },
+    data: [],
+  },
+  {
+    type: "picker",
     label: "跟单员",
     prop: "merchUserId",
     itemType: "onePicker",
@@ -389,26 +441,6 @@ const formConfig = reactive([
   },
 ]);
 const formConfigOne = reactive([
-  // {
-  //   type: "picker",
-  //   label: "币种",
-  //   prop: "currency",
-  //   itemType: "onePicker",
-  //   showPicker: false,
-  //   fieldNames: {
-  //     text: "label",
-  //     value: "value",
-  //   },
-  //   data: [],
-  //   readonly: false,
-  // },
-  // {
-  //   type: "input",
-  //   label: "汇率",
-  //   prop: "rate",
-  //   itemType: "number",
-  //   readonly: false,
-  // },
   {
     type: "picker",
     label: "是否含税",
@@ -433,6 +465,19 @@ const formConfigOne = reactive([
   },
   {
     type: "picker",
+    label: "税点",
+    prop: "taxPoints",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "dictValue",
+      value: "dictKey",
+    },
+    data: [],
+    readonly: false,
+  },
+  {
+    type: "picker",
     label: "是否含运费",
     prop: "isFreight",
     itemType: "onePicker",
@@ -455,32 +500,53 @@ const formConfigOne = reactive([
   },
   {
     type: "picker",
-    label: "付款方式",
-    prop: "paymentMethod",
+    label: "客户结算方式",
+    prop: "settlementMethod",
     itemType: "onePicker",
     showPicker: false,
     fieldNames: {
-      text: "label",
-      value: "value",
+      text: "dictValue",
+      value: "dictKey",
     },
     data: [],
     readonly: false,
   },
   {
-    type: "input",
-    label: "预付款比例(%)",
-    prop: "advanceRatio",
-    itemType: "number",
+    type: "picker",
+    label: "客户付款方式",
+    prop: "paymentMethod",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "dictValue",
+      value: "dictKey",
+    },
+    data: [],
     readonly: false,
   },
   {
     type: "input",
-    label: "付款条件",
-    prop: "remark",
-    itemType: "textarea",
+    label: "阿里巴巴订单编号",
+    prop: "alibabaCode",
+    itemType: "text",
+    readonly: true,
   },
   {
     type: "picker",
+    label: "1688店铺名称",
+    prop: "alibabaShopName",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "label",
+      value: "value",
+    },
+    data: [],
+    readonly: false,
+  },
+
+  {
+    type: "picker",
     label: "收款账号",
     prop: "shroffAccountId",
     itemType: "onePicker",
@@ -524,50 +590,42 @@ const formConfigOne = reactive([
     prop: "accountOpening",
     itemType: "text",
   },
-  // {
-  //   type: "input",
-  //   label: "Beneficiary Name",
-  //   prop: "beneficiaryName",
-  //   itemType: "text",
-  // },
-  // {
-  //   type: "input",
-  //   label: "Beneficiary Account Number",
-  //   prop: "beneficiaryAccountNumber",
-  //   itemType: "text",
-  // },
-  // {
-  //   type: "input",
-  //   label: "Beneficiary Bank",
-  //   prop: "beneficiaryBank",
-  //   itemType: "text",
-  // },
-  // {
-  //   type: "input",
-  //   label: "Swift Code",
-  //   prop: "swiftCode",
-  //   itemType: "text",
-  // },
-  // {
-  //   type: "input",
-  //   label: "Beneficiary Bank Address",
-  //   prop: "beneficiaryBankAddress",
-  //   itemType: "text",
-  // },
-  // {
-  //   type: "input",
-  //   label: "Beneficiary Address",
-  //   prop: "beneficiaryAddress",
-  //   itemType: "text",
-  // },
+
+  {
+    type: "input",
+    label: "其他收款方式备注说明",
+    prop: "remark",
+    itemType: "textarea",
+  },
+  {
+    type: "input",
+    label: "定金比例(%)",
+    prop: "advanceRatio",
+    itemType: "number",
+    readonly: false,
+  },
+  {
+    type: "input",
+    label: "出货前付款比例",
+    prop: "beforeShipmentRatio",
+    itemType: "number",
+    readonly: false,
+  },
+  {
+    type: "input",
+    label: "出货后付款比例",
+    prop: "afterShipmentRatio",
+    itemType: "number",
+    readonly: false,
+  },
   {
     type: "title",
     title: "交付信息",
   },
   {
     type: "picker",
-    label: "交货期限",
-    prop: "deliveryTime",
+    label: "销售日期",
+    prop: "saleDate",
     itemType: "datePicker",
     showPicker: false,
     split: "-",
@@ -575,23 +633,13 @@ const formConfigOne = reactive([
   },
   {
     type: "picker",
-    label: "运输方式",
-    prop: "transportMethod",
-    itemType: "onePicker",
+    label: "交货期限",
+    prop: "deliveryTime",
+    itemType: "datePicker",
     showPicker: false,
-    fieldNames: {
-      text: "label",
-      value: "value",
-    },
-    data: [],
-    readonly: false,
+    split: "-",
+    columnsType: ["year", "month", "day"],
   },
-  // {
-  //   type: "input",
-  //   label: "运输说明",
-  //   prop: "transportRemark",
-  //   itemType: "text",
-  // },
 ]);
 const formGoodsOption = reactive({
   readonly: false,
@@ -618,70 +666,6 @@ const formGoodsOption = reactive({
           value: "id",
         },
         data: [],
-        changeFn: (val, data, index, indexTwo, propName) => {
-          let selectList = formData.data[propName].filter(
-            (item, itemIndex) =>
-              item[data.prop] === val.selectedValues[0] && itemIndex !== index
-          );
-          if (selectList && selectList.length > 0) {
-            return showFailToast(proxy.t("contract.productRepeat"));
-          }
-          formData.data[propName][index][data.prop] = val.selectedValues[0];
-          formData.data.contractShipmentList[index][data.prop] =
-            val.selectedValues[0];
-          let list = data.data.filter(
-            (item) => item[data.fieldNames.value] == val.selectedValues[0]
-          );
-          if (list && list.length > 0) {
-            formData.data[propName][index][data.prop + "Name"] =
-              list[0][data.fieldNames.text];
-            if (list[0].ehsdJson) {
-              let ehsdJson = JSON.parse(list[0].ehsdJson);
-              if (ehsdJson) {
-                formData.data[propName][index].productName =
-                  ehsdJson.nameEnglish || "";
-                formData.data.contractShipmentList[index].productName =
-                  ehsdJson.nameEnglish || list[0][data.fieldNames.text];
-                formData.data.contractShipmentList[index].productCode =
-                  list[0].code;
-                formData.data[propName][index].productModel =
-                  ehsdJson.productLong +
-                  "*" +
-                  ehsdJson.productWide +
-                  "*" +
-                  ehsdJson.productHigh;
-                // 包装方式
-                let str = "";
-                let strOne = "";
-                if (ehsdJson.innerPackMethod) {
-                  let innerPackMethodArr = ehsdJson.innerPackMethod.split(",");
-                  innerPackMethodArr = innerPackMethodArr.map((x) =>
-                    proxy.dictValueLabel(x, innerMethod.value)
-                  );
-                  str += innerPackMethodArr.join(",");
-                }
-                if (ehsdJson.outerPackMethod) {
-                  let outerPackMethodArr = ehsdJson.outerPackMethod.split(",");
-                  outerPackMethodArr = outerPackMethodArr.map((x) =>
-                    proxy.dictValueLabel(x, outsideMethod.value)
-                  );
-                  strOne += outerPackMethodArr.join(",");
-                }
-                formData.data[propName][index].packMethod = str + "," + strOne;
-              }
-            }
-          } else {
-            formData.data[propName][index][data.prop + "Name"] = "";
-          }
-          formData.data[propName][index].quantity = null;
-          formData.data[propName][index].price = null;
-          formData.data[propName][index].amount = null;
-          formData.data[propName][index].remark = null;
-          formData.data.contractShipmentList[index].shipmentTime = null;
-          formData.data.contractShipmentList[index].quantity = null;
-          formData.data.contractShipmentList[index].remark = null;
-          data.showPicker = false;
-        },
       },
       {
         type: "input",
@@ -697,6 +681,37 @@ const formGoodsOption = reactive({
       },
       {
         type: "input",
+        label: "颜色",
+        prop: "productColor",
+        itemType: "text",
+      },
+      {
+        type: "picker",
+        label: "纹路",
+        prop: "productFrontalTexture",
+        itemType: "onePicker",
+        showPicker: false,
+        readonly: false,
+        fieldNames: {
+          text: "dictValue",
+          value: "dictKey",
+        },
+        data: [],
+      },
+      {
+        type: "input",
+        label: "净重",
+        prop: "productNetWeight",
+        itemType: "text",
+      },
+      {
+        type: "input",
+        label: "单位",
+        prop: "productUnit",
+        itemType: "text",
+      },
+      {
+        type: "input",
         label: "数量",
         prop: "quantity",
         itemType: "number",
@@ -715,7 +730,14 @@ const formGoodsOption = reactive({
       },
       {
         type: "input",
-        label: "金额",
+        label: "业务供货价",
+        prop: "businessCostPrice",
+        itemType: "number",
+        changeFn: () => {},
+      },
+      {
+        type: "input",
+        label: "小计",
         prop: "amount",
         itemType: "number",
         changeFn: () => {
@@ -724,6 +746,13 @@ const formGoodsOption = reactive({
       },
       {
         type: "input",
+        label: "业务小计",
+        prop: "amountTwo",
+        itemType: "number",
+        changeFn: () => {},
+      },
+      {
+        type: "input",
         label: "备注",
         prop: "remark",
         itemType: "textarea",
@@ -787,11 +816,36 @@ const formEmptyConfig = reactive([]);
 const formAmountProjectConfig = reactive([
   {
     type: "title",
-    title: "合同模板",
+    title: "订单总金额",
+  },
+  {
+    type: "input",
+    label: "订单总金额",
+    prop: "amount",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "业务总⾦额",
+    prop: "factoryAmount",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "合计⽑利",
+    prop: "grossProfit",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "title",
+    title: "合同条款",
   },
   {
     type: "picker",
-    label: "合同模板",
+    label: "合同条款",
     prop: "contractTemplateId",
     itemType: "onePicker",
     showPicker: false,
@@ -807,17 +861,6 @@ const formAmountProjectConfig = reactive([
     slotName: "templateContent",
     label: "模板内容",
   },
-  {
-    type: "title",
-    title: "合同总金额",
-  },
-  {
-    type: "input",
-    label: "合同总金额",
-    prop: "amount",
-    itemType: "text",
-    readonly: true,
-  },
 ]);
 const formProjectOption = reactive({
   readonly: false,
@@ -977,13 +1020,22 @@ const getDict = () => {
     tenantId: getUserInfo().tenantId,
   };
 
+  // proxy
+  //   .get("/tenantDept/list", {
+  //     ...query,
+  //     type: 0,
+  //   })
+  //   .then((res) => {
+  //     formConfigCode[5].data = proxy.handleTree(res.data, "deptId");
+  //   });
+
+  // 订单渠道
   proxy
-    .get("/tenantDept/list", {
-      ...query,
-      type: 0,
-    })
+    .post("/dictTenantData/page", { ...query, dictCode: "contract_channel" })
     .then((res) => {
-      formConfigCode[5].data = proxy.handleTree(res.data, "deptId");
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfigCode[7].data = res.data.rows;
+      }
     });
 
   proxy
@@ -994,7 +1046,13 @@ const getDict = () => {
     })
     .then((res) => {
       if (res.rows && res.rows.length > 0) {
-        formConfigCode[7].data = res.rows.map((item) => {
+        formConfigCode[9].data = res.rows.map((item) => {
+          return {
+            text: item.nickName,
+            value: item.userId,
+          };
+        });
+        formConfigCode[10].data = res.rows.map((item) => {
           return {
             text: item.nickName,
             value: item.userId,
@@ -1038,20 +1096,34 @@ const getDict = () => {
     .then((res) => {
       formGoodsOption.btnConfig.listConfig[0].data = res.data.rows;
     });
+  // 纹路
+
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "front_lines" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formGoodsOption.btnConfig.listConfig[4].data = res.data.rows;
+      }
+    });
+
+  // 税点
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "tax_points" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfigOne[1].data = res.data.rows;
+      }
+    });
+
+  // 结算方式
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "settlement_way" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfigOne[3].data = res.data.rows;
+      }
+    });
 
-  // 币种
-  // proxy
-  //   .post("/dictTenantData/page", { ...query, dictCode: "account_currency" })
-  //   .then((res) => {
-  //     if (res.data.rows && res.data.rows.length > 0) {
-  //       formConfigOne[0].data = res.data.rows.map((item) => {
-  //         return {
-  //           label: item.dictValue,
-  //           value: item.dictKey,
-  //         };
-  //       });
-  //     }
-  //   });
   // 付款方式
   proxy
     .post("/dictTenantData/page", {
@@ -1060,21 +1132,27 @@ const getDict = () => {
     })
     .then((res) => {
       if (res.data.rows && res.data.rows.length > 0) {
-        formConfigOne[2].data = res.data.rows.map((item) => {
-          return {
-            label: item.dictValue,
-            value: item.dictKey,
-          };
-        });
+        formConfigOne[4].data = res.data.rows;
       }
     });
 
+  // 店铺名称
+  proxy
+    .post("/dictTenantData/page", {
+      ...query,
+      dictCode: "shop_name",
+    })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfigOne[6].data = res.data.rows;
+      }
+    });
   // 账户
   proxy
     .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
     .then((res) => {
       if (res.data.rows && res.data.rows.length > 0) {
-        formConfigOne[5].data = res.data.rows.map((item) => {
+        formConfigOne[7].data = res.data.rows.map((item) => {
           return {
             ...item,
             label: item.alias,
@@ -1084,23 +1162,7 @@ const getDict = () => {
       }
     });
 
-  // 运输方式
-  proxy
-    .post("/dictTenantData/page", {
-      ...query,
-      dictCode: "shipping_method",
-    })
-    .then((res) => {
-      if (res.data.rows && res.data.rows.length > 0) {
-        formConfigOne[11].data = res.data.rows.map((item) => {
-          return {
-            label: item.dictValue,
-            value: item.dictKey,
-          };
-        });
-      }
-    });
-  // 合同模板
+  // 合同条款
   proxy
     .post("/contractTemplate/page", {
       pageNum: 1,
@@ -1108,7 +1170,7 @@ const getDict = () => {
       templateType: "1",
     })
     .then((res) => {
-      formAmountProjectConfig[1].data = res.data.rows.map((x) => ({
+      formAmountProjectConfig[5].data = res.data.rows.map((x) => ({
         label: x.templateName,
         value: x.id,
       }));
@@ -1231,14 +1293,7 @@ const handleSubmit = async () => {
               active.value = 2;
               return false;
             } else {
-              return formDom6.value.validateForm().then((status3) => {
-                if (status3) {
-                  active.value = 3;
-                  return false;
-                } else {
-                  return true;
-                }
-              });
+              return true;
             }
           });
         }
@@ -1246,6 +1301,18 @@ const handleSubmit = async () => {
     }
   });
   if (flag) {
+    formData.data.contractProductList = formData.data.contractProductList.map(
+      (item) => {
+        let ehsdJson = JSON.stringify({
+          packMethod: item.packMethod,
+          tradeMethods: item.tradeMethods,
+        });
+        return {
+          ...item,
+          ehsdJson: ehsdJson,
+        };
+      }
+    );
     return formData.data;
   }
 };
@@ -1254,6 +1321,7 @@ onMounted(() => {
   if (route.query && route.query.businessId) {
     let businessId = route.query.businessId;
     proxy.post("/contract/detail", { id: businessId }).then((res) => {
+      res.data.isTax = res.data.isTax + "";
       res.data.countryId = res.data.buyCountryId;
       res.data.provinceId = res.data.buyProvinceId;
       res.data.cityId = res.data.buyCityId;

+ 57 - 3
src/views/salesContract/contract/index.vue

@@ -8,7 +8,20 @@
   <van-pull-refresh v-model="loading" @refresh="onRefresh">
     <div class="list">
       <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="getList" style="margin-bottom: 60px">
-        <commonList :data="listData" @onClick="toDtl" :config="listConfig"></commonList>
+        <commonList :data="listData" @onClick="toDtl" :config="listConfig">
+
+          <template #contractType="{row}">
+            <div style="width:100%">
+              {{dictKeyValue(row.contractType,contractType)}}
+            </div>
+          </template>
+
+          <template #processingMethod="{row}">
+            <div style="width:100%">
+              {{dictKeyValue(row.processingMethod,processingMethod)}}
+            </div>
+          </template>
+        </commonList>
       </van-list>
     </div>
   </van-pull-refresh>
@@ -119,14 +132,55 @@ const toDtl = (row) => {
     },
   });
 };
+
+const contractType = ref([
+  {
+    dictKey: "3",
+    dictValue: "打样订单",
+  },
+  {
+    dictKey: "2",
+    dictValue: "内销订单",
+  },
+  {
+    dictKey: "1",
+    dictValue: "外贸订单(退税)",
+  },
+  {
+    dictKey: "4",
+    dictValue: "外贸订单(不退税)",
+  },
+]);
+
+const processingMethod = ref([
+  {
+    dictKey: 10,
+    dictValue: "业务自采",
+  },
+  {
+    dictKey: 20,
+    dictValue: "生产处理",
+  },
+]);
+
 const listConfig = ref([
   {
     label: proxy.t("contract.code"),
     prop: "code",
   },
   {
-    label: "生产公司",
-    prop: "companyName",
+    label: "业务公司",
+    prop: "ofCompanyName",
+  },
+  {
+    type: "slot",
+    label: "订单类型",
+    slotName: "contractType",
+  },
+  {
+    type: "slot",
+    label: "订单处理方式",
+    slotName: "processingMethod",
   },
   {
     label: "业务员",

+ 167 - 24
src/views/salesContract/priceSheet/add.vue

@@ -6,8 +6,10 @@
       <TitleInfo :title="'基本信息'"></TitleInfo>
       <van-cell-group inset>
         <van-field v-model="formData.code" readonly label="报价单号" />
-        <van-field v-model="formData.typeName" readonly label="报价类型" />
+        <van-field v-model="formData.ofCompanyName" readonly label="业务公司" />
+        <van-field v-model="formData.deptName" readonly label="业务部门" />
         <van-field v-model="formData.companyName" readonly label="报价公司" />
+
       </van-cell-group>
       <!-- <van-field readonly label="产品图 / 设计图">
           <template #input>
@@ -27,41 +29,53 @@
       <TitleInfo :title="'贸易信息'"></TitleInfo>
       <van-cell-group inset>
         <van-field v-model="formData.buyCorporationName" readonly label="客户名称" />
-        <van-field v-model="formData.address" readonly label="地址" />
+        <!-- <van-field v-model="formData.address" readonly label="地址" />
         <van-field v-model="formData.buyPostalCode" readonly label="邮编" />
         <van-field v-model="formData.buyAddress" readonly label="详细地址" />
         <van-field v-model="formData.buyContactName" readonly label="联系人" />
-        <van-field v-model="formData.buyContactNumber" readonly label="联系人电话" />
+        <van-field v-model="formData.buyContactNumber" readonly label="联系人电话" /> -->
       </van-cell-group>
       <div style="height:20px"></div>
       <TitleInfo :title="'商品信息'"></TitleInfo>
       <van-collapse v-model="activeNames">
         <van-collapse-item v-for="(product,index) in formData.quotationProductList" :name="index" :key="index">
           <template #title>
-            <div>商品名称:{{product.productName}}</div>
-            <div>商品编码:{{product.productCode}}</div>
-            <div>尺寸(cm):{{product.size}}</div>
+            <!-- <div>商品名称:{{product.productName}}</div> -->
+            <div>商品编码:{{product.productCode || '定制产品'}}</div>
+            <!-- <div>尺寸(cm):{{product.size}}</div> -->
             <div style="display:flex;">
               <span>数量:{{product.quantity}}</span><span style="margin-left:15px">单价:¥{{product.price}}</span><span
-                    style="margin-left:15px">小计:{{product.amount}}</span>
+                    style="margin-left:15px">总价:{{product.amount}}</span>
             </div>
           </template>
+          <div style="background:#fff;margin-bottom:15px;color:#323233;">
+            <div style="margin-left:-10px;">
+              <TitleInfo :title="'基本信息'"></TitleInfo>
+            </div>
+            <div style="padding-left:10px;padding-top:5px">
+              <div>颜色:{{product.productColor }}</div>
+              <div style="margin-top:3px"> 色卡号:{{product.colorCardCode }}</div>
+              <div style="margin-top:3px">尺寸(cm):{{product.productLength }}*{{product.productWidth }}*{{product.productHeight }}</div>
+              <div style="margin-top:3px">净重(kg):{{product.netWeight }}</div>
+            </div>
+          </div>
+
           <div style="background:#fff">
-            <div style="display:flex;margin-left:-10px;align-items:center">
-              <TitleInfo :title="'BOM单:'"></TitleInfo>
+            <div style="display:flex;margin-left:-10px;align-items:center;margin-bottom:15px;color:#323233;">
+              <TitleInfo :title="'辅材:'"></TitleInfo>
               <div>(表格可向右滑动)</div>
             </div>
             <div style="width:100%;overflow-x:auto">
               <table border class="table">
                 <thead>
                   <tr>
-                    <th style="min-width:90px;">物料编码</th>
-                    <th style="min-width:200px">物料名称</th>
-                    <th style="min-width:100px">尺寸(cm)</th>
+                    <th style="min-width:120px;">物料编码</th>
+                    <th style="min-width:120px">物料名称</th>
+                    <th style="min-width:80px">尺寸(cm)</th>
+                    <th style="min-width:90px">颜色</th>
+                    <th style="min-width:70px">标准用量</th>
+                    <th style="min-width:70px">损耗率(%)</th>
                     <th style="min-width:50px">数量</th>
-                    <th style="min-width:50px">总量</th>
-                    <th style="min-width:50px">单价</th>
-                    <th style="min-width:50px">小计</th>
                     <th style="min-width:150px">备注</th>
                   </tr>
                 </thead>
@@ -69,17 +83,70 @@
                   <tr v-for="(item,sonIndex) in product.quotationProductBomList" :key="sonIndex">
                     <td>{{item.productCode}}</td>
                     <td>{{item.productName}}</td>
-                    <td>{{item.size}}</td>
+                    <td>
+                      <span v-if="item.size">{{item.size}}</span>
+                    </td>
+                    <td>{{item.productColor}}</td>
+                    <td>{{item.standardDosage}}</td>
+                    <td>{{item.lossRate}}</td>
                     <td>{{item.quantity}}</td>
-                    <td>{{item.allQuantity}}</td>
-                    <td>¥{{item.price}}</td>
-                    <td>{{item.amount}}</td>
                     <td>{{item.remark}}</td>
                   </tr>
                 </tbody>
               </table>
             </div>
           </div>
+          <div style="background:#fff;margin-bottom:15px;color:#323233;">
+            <div style="margin-left:-10px;">
+              <TitleInfo :title="'附加工艺要求'"></TitleInfo>
+            </div>
+            <div style="padding-left:10px;padding-top:5px">
+              <div class="small-title">
+                ① LOGO
+              </div>
+              <div style="margin-top:3px">LOGO尺寸(cm):{{product.logoLength }} * {{product.logoWidth }}</div>
+              <div style="margin-top:3px"> 几色印刷:{{product.colorCount }}</div>
+              <div class="small-title">
+                ② 折叠
+              </div>
+              <div style="margin-top:3px"> 是否折叠:{{ product.isFold==1?'是':"否" }}</div>
+              <div style="margin-top:3px" v-if="product.isFold"> 折叠数:{{ dictKeyValue(product.foldWay,foldWayData) }}</div>
+              <div class="small-title">
+                ③ 包装要求
+              </div>
+              <div style="margin-top:3px"> 包装要求:{{ getPackAsk(product.packAsk) }}</div>
+              <div class="small-title">
+                ④ 是否定制
+              </div>
+              <div style="margin-top:3px">是否定制:{{ product.isCustomized==1?'是':"否" }}</div>
+              <div style="margin-top:3px" v-if="product.isCustomized">
+                定制内容:
+              </div>
+              <div style="width:100%;overflow-x:auto;" v-if="product.isCustomized">
+
+                <table border class="table">
+                  <thead>
+                    <tr>
+                      <th style="min-width:100px;"></th>
+                      <th style="min-width:150px">附件</th>
+                      <th style="min-width:200px">备注</th>
+                    </tr>
+                  </thead>
+                  <tbody v-if="product.quotationProductCustomInfoList && product.quotationProductCustomInfoList.length>0">
+                    <tr v-for="(item,sonIndex) in product.quotationProductCustomInfoList" :key="sonIndex">
+                      <td><van-checkbox v-model="item.isCheckBox" disabled>{{getLabelOne(item.type)}}</van-checkbox></td>
+                      <td>
+                        <div v-for="file in item.fileList" :key="file.id" style="color:#409eff" @click="onPreviewFile(file.fileName,file.fileUrl)">
+                          {{file.fileName}}
+                        </div>
+                      </td>
+                      <td>{{item.remark}}</td>
+                    </tr>
+                  </tbody>
+                </table>
+              </div>
+            </div>
+          </div>
         </van-collapse-item>
       </van-collapse>
       <div style="height:20px"></div>
@@ -96,6 +163,7 @@ import { ref, getCurrentInstance, onMounted } from "vue";
 import { showSuccessToast, showFailToast } from "vant";
 import { useRoute } from "vue-router";
 import TitleInfo from "@/components/TitleInfo/index.vue";
+import { getUserInfo } from "@/utils/auth";
 
 const proxy = getCurrentInstance().proxy;
 const route = useRoute();
@@ -113,10 +181,32 @@ const formData = ref({
   dueDate: "",
 });
 const submitData = ref({});
-
 const columns = ref([]);
+const foldWayData = ref([]);
+const packAskData = ref([]);
+const getDict = () => {
+  let query = {
+    pageNum: 1,
+    pageSize: 999,
+    tenantId: getUserInfo().tenantId,
+  };
+  // 折叠数
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "fold_way" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        foldWayData.value = res.data.rows;
+      }
+    });
 
-const getDict = () => {};
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "pack_ask" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        packAskData.value = res.data.rows;
+      }
+    });
+};
 
 const onConfirm = ({ selectedOptions }) => {
   formData.value.finishQuantity = selectedOptions[0].finishQuantity;
@@ -153,16 +243,40 @@ const onSubmit = () => {
 const getDetail = () => {
   proxy.post("/saleQuotation/detail", { id: route.query.id }).then(
     (res) => {
-      res.data.typeName = res.data.type == "1" ? "内销" : "外销";
       res.data.address = `${res.data.buyCountryName} ${res.data.buyProvinceName} ${res.data.buyCityName}`;
       formData.value = res.data;
       for (let i = 0; i < formData.value.quotationProductList.length; i++) {
         const iele = formData.value.quotationProductList[i];
+        if (iele.packAsk) {
+          iele.packAsk = iele.packAsk.split(",");
+        } else {
+          iele.packAsk = [];
+        }
         iele.size = `${iele.productLength} * ${iele.productWidth} * ${iele.productHeight}`;
         for (let j = 0; j < iele.quotationProductBomList.length; j++) {
           const jele = iele.quotationProductBomList[j];
-          jele.allQuantity = iele.quantity * jele.quantity;
-          jele.size = `${jele.productLength} * ${jele.productWidth} * ${jele.productHeight}`;
+          if (jele.productLength && jele.productWidth) {
+            jele.size = `${jele.productLength} * ${jele.productWidth} * ${jele.productHeight}`;
+          }
+        }
+
+        if (
+          iele.quotationProductCustomInfoList &&
+          iele.quotationProductCustomInfoList.length > 0
+        ) {
+          for (let j = 0; j < iele.quotationProductCustomInfoList.length; j++) {
+            const jele = iele.quotationProductCustomInfoList[j];
+            if (jele.fileList) {
+              jele.fileList = jele.fileList.map((x) => ({
+                ...x,
+                url: x.fileUrl,
+                name: x.fileName,
+              }));
+            } else {
+              jele.fileList = [];
+            }
+            jele.isCheckBox = jele.isCheck == 1;
+          }
         }
       }
     },
@@ -187,6 +301,28 @@ const onPreviewFile = (name, url) => {
     },
   });
 };
+
+let obj = {
+  1: "定制刀模",
+  2: "定制纹路",
+  3: "定制模具",
+};
+const getLabelOne = (type) => {
+  return obj[type];
+};
+
+const getPackAsk = (val) => {
+  let str = "";
+  if (val && val.length > 0) {
+    for (let i = 0; i < val.length; i++) {
+      const row = val[i];
+      str +=
+        proxy.dictKeyValue(row, packAskData.value) +
+        (i < val.length - 1 ? "," : "");
+    }
+  }
+  return str;
+};
 </script>
 <style lang="scss" scoped>
 .row {
@@ -225,4 +361,11 @@ const onPreviewFile = (name, url) => {
   object-fit: contain;
   vertical-align: middle;
 }
+.small-title {
+  // padding-left: 15px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+  color: #3366ff;
+  font-size: 14px;
+}
 </style>

+ 5 - 1
src/views/salesContract/priceSheet/index.vue

@@ -96,11 +96,15 @@ const toDtl = (row) => {
 };
 const listConfig = ref([
   {
+    label: "业务公司",
+    prop: "ofCompanyName",
+  },
+  {
     label: "报价单号",
     prop: "code",
   },
   {
-    label: "报价子公司",
+    label: "报价工厂",
     prop: "companyName",
   },
   {