Parcourir la source

部分新需求以及部分新页面

cz il y a 1 an
Parent
commit
56fbc7d1f7
27 fichiers modifiés avec 1097 ajouts et 1004 suppressions
  1. 0 0
      src/assets/icons/svg/huoche1.svg
  2. 0 0
      src/assets/icons/svg/huochuan1.svg
  3. 1 1
      src/components/byForm/index.vue
  4. 1 1
      src/components/headerBar/header-bar.vue
  5. 3 3
      src/components/process/EHSD/Contract.vue
  6. 200 149
      src/components/process/SF/Contract.vue
  7. 187 137
      src/components/process/SF/ContractChange.vue
  8. 7 0
      src/components/product/SelectProduct.vue
  9. 1 1
      src/components/product/treeList.vue
  10. 112 27
      src/views/EHSD/productLibrary/companyProduct/index.vue
  11. 9 8
      src/views/EHSD/saleContract/PriceSheetDetail.vue
  12. 235 171
      src/views/EHSD/saleContract/contractEHSD/index.vue
  13. 18 3
      src/views/EHSD/saleContract/performanceSet/index.vue
  14. 8 8
      src/views/EHSD/saleContract/priceSheetEHSD/index.vue
  15. 5 3
      src/views/EHSD/saleContract/priceSheetForeign/index.vue
  16. 136 384
      src/views/MES/processScheduling/index.vue
  17. 7 7
      src/views/MES/productionMaterial/index.vue
  18. 57 40
      src/views/MES/productionOrder/index.vue
  19. 6 18
      src/views/MES/productionScheduling/index.vue
  20. 21 11
      src/views/MES/productionTask/index.vue
  21. 6 2
      src/views/MES/productionWorkOrder/index.vue
  22. 0 14
      src/views/MES/reportDetail/index.vue
  23. 1 1
      src/views/process/processApproval/index.vue
  24. 1 1
      src/views/salesMange/afterSales/SelectContractProduct.vue
  25. 2 2
      src/views/salesMange/saleContract/contract/index.vue
  26. 1 1
      src/views/salesMange/saleContract/contractSelect/index.vue
  27. 72 11
      src/views/systemTenant/tenant/userTenant/index.vue

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/assets/icons/svg/huoche1.svg


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/assets/icons/svg/huochuan1.svg


+ 1 - 1
src/components/byForm/index.vue

@@ -41,7 +41,7 @@
                      :disabled="i.disabled ? i.disabled : false" :clearable="i.clearable ? i.clearable : false"
                      :filterable="i.filterable ? true : false" :style="i.style?i.style:{width:'100%'}" :readonly="i.readonly ? i.readonly : false">
             <el-option :label="j.dictValue || j.name || j.label" :value="j.dictKey||j.id || j.value" v-for="j in i.data"
-                       :key="j.id || j.dictKey || j.value">
+                       :key="j.id || j.dictKey || j.value" :disabled="j.disabled ?j.disabled:false ">
             </el-option>
           </el-select>
           <el-tree-select v-model="formData[i.prop]" v-else-if="i.type == 'treeSelect'" :data="i.data" :readonly="i.readonly ? i.readonly : false"

+ 1 - 1
src/components/headerBar/header-bar.vue

@@ -343,7 +343,7 @@
         </div>
         <div class="notice">
           <div class="item" v-for="(item,index) in noticeData" :key="item.id">
-            <svg-icon :icon-class="item.type==1?'huochuan':'huoche'" className="icon" />
+            <svg-icon :icon-class="item.type==1?'huochuan1':'huoche1'" className="icon" />
             <div class="text">
               {{item.type==1?item.shipmentTime:item.arrivalTime}}单号为
               &nbsp;<span class="code" @click="openDetails(item)">{{item.code}}</span>&nbsp;

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

@@ -368,12 +368,12 @@ const formConfig = computed(() => {
     // },
     {
       type: "title",
-      title: "合同类型",
+      title: "订单类型",
     },
     {
       type: "select",
       prop: "contractType",
-      label: "合同类型",
+      label: "订单类型",
       data: [
         {
           dictKey: "0",
@@ -606,7 +606,7 @@ const formConfig = computed(() => {
 });
 const rules = ref({
   contractType: [
-    { required: true, message: "请选择合同类型", trigger: "change" },
+    { required: true, message: "请选择订单类型", trigger: "change" },
   ],
   sellCorporationId: [
     { required: true, message: "请选择卖方公司", trigger: "change" },

+ 200 - 149
src/components/process/SF/Contract.vue

@@ -212,7 +212,7 @@
               </template>
             </el-table-column>
             <el-table-column prop="productCnName" label="商品名称" min-width="130" />
-            <el-table-column prop="productCode" label="商品编码" width="130" />
+            <el-table-column prop="productCode" label="商品编码" width="150" />
             <el-table-column label="尺寸 (cm)" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -220,7 +220,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="productColor" label="颜色" width="100" />
+            <el-table-column prop="productColor" label="颜色" width="140" />
             <el-table-column label="设计图稿" width="80">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -409,7 +409,7 @@
     </byForm>
 
     <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="产品库" width="90%" append-to-body>
-      <SelectProduct @selectProduct="selectProduct" :companyId="formData.data.companyId" :isRawMaterial="'1'"></SelectProduct>
+      <SelectProduct @selectProduct="selectProduct" :companyId="formData.data.companyId" :isRawMaterial="'1'" :disablePerm="'1'"></SelectProduct>
       <template #footer>
         <el-button @click="openProductCompany = false" size="defualt" v-debounce>关 闭</el-button>
       </template>
@@ -532,9 +532,13 @@ const formConfig = computed(() => {
     {
       type: "select",
       prop: "contractType",
-      label: "合同类型",
+      label: "订单类型",
       data: [
         {
+          dictKey: "3",
+          dictValue: "打样订单",
+        },
+        {
           dictKey: "2",
           dictValue: "常规订单",
         },
@@ -560,7 +564,7 @@ const formConfig = computed(() => {
     {
       type: "treeSelect",
       prop: "companyId",
-      label: "生产公司",
+      label: "工厂",
       data: treeData.value,
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
@@ -572,6 +576,22 @@ const formConfig = computed(() => {
     },
     {
       type: "select",
+      prop: "belongType",
+      label: "订单归属",
+      data: [
+        {
+          dictKey: "1",
+          dictValue: "归属工厂",
+        },
+        {
+          dictKey: "2",
+          dictValue: "归属业务",
+        },
+      ],
+      itemWidth: 50,
+    },
+    {
+      type: "select",
       prop: "merchUserId",
       label: "跟单员",
       data: userList.value,
@@ -599,40 +619,24 @@ const formConfig = computed(() => {
       title: "付款信息",
       haveLine: true,
     },
-    {
-      type: "select",
-      prop: "currency",
-      label: "币种",
-      data: currencyData.value,
-      itemWidth: 25,
-      disabled: formData.data.contractType == "2",
-    },
-    {
-      type: "number",
-      prop: "rate",
-      label: "汇率",
-      precision: 2,
-      min: 0,
-      controls: false,
-      itemWidth: 25,
-      disabled: formData.data.contractType == "2",
-    },
-    {
-      type: "select",
-      prop: "paymentMethod",
-      label: "付款方式",
-      data: fundsPaymentMethod.value,
-      itemWidth: 25,
-    },
-    {
-      type: "number",
-      prop: "advanceRatio",
-      label: "预付款比列(%)",
-      precision: 2,
-      min: 0,
-      controls: false,
-      itemWidth: 25,
-    },
+    // {
+    //   type: "select",
+    //   prop: "currency",
+    //   label: "币种",
+    //   data: currencyData.value,
+    //   itemWidth: 25,
+    //   disabled: formData.data.contractType == "2",
+    // },
+    // {
+    //   type: "number",
+    //   prop: "rate",
+    //   label: "汇率",
+    //   precision: 2,
+    //   min: 0,
+    //   controls: false,
+    //   itemWidth: 25,
+    //   disabled: formData.data.contractType == "2",
+    // },
     {
       type: "select",
       prop: "isTax",
@@ -666,77 +670,93 @@ const formConfig = computed(() => {
       itemWidth: 25,
     },
     {
+      type: "select",
+      prop: "paymentMethod",
+      label: "付款方式",
+      data: fundsPaymentMethod.value,
+      itemWidth: 25,
+    },
+    {
+      type: "number",
+      prop: "advanceRatio",
+      label: "预付款比列(%)",
+      precision: 2,
+      min: 0,
+      controls: false,
+      itemWidth: 25,
+    },
+    {
       type: "input",
       prop: "remark",
       label: "付款条件",
       itemType: "textarea",
-      itemWidth: 50,
+      itemWidth: 100,
     },
     {
       type: "select",
       prop: "shroffAccountId",
       label: "收款账号",
       data: accountList.value,
-      itemWidth: 100,
+      itemWidth: 50,
       fn: (val) => {
         changeShroffAccount(val);
       },
     },
-    {
-      type: "input",
-      prop: "beneficiaryName",
-      label: " ",
-      placeholder: "请输入Beneficiary Name",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryAccountNumber",
-      label: " ",
-      placeholder: "请输入Beneficiary Account Number",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryBank",
-      label: " ",
-      placeholder: "请输入Beneficiary Bank",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "swiftCode",
-      label: " ",
-      placeholder: "请输入Swift Code",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryBankAddress",
-      label: " ",
-      placeholder: "请输入Beneficiary Bank Address",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryAddress",
-      label: " ",
-      placeholder: "请输入Beneficiary Address",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryName",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Name",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryAccountNumber",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Account Number",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryBank",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Bank",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "swiftCode",
+    //   label: " ",
+    //   placeholder: "请输入Swift Code",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryBankAddress",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Bank Address",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryAddress",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Address",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
     {
       type: "input",
       prop: "accountName",
       label: "户名",
       placeholder: "请输入户名",
       itemWidth: 50,
-      isShow: formData.data.contractType == "2",
+      // isShow: formData.data.contractType == "2",
     },
     {
       type: "input",
@@ -744,7 +764,7 @@ const formConfig = computed(() => {
       label: "开户行",
       placeholder: "请输入开户行",
       itemWidth: 50,
-      isShow: formData.data.contractType == "2",
+      // isShow: formData.data.contractType == "2",
     },
     {
       type: "input",
@@ -752,7 +772,7 @@ const formConfig = computed(() => {
       label: "账号",
       placeholder: "请输入账号",
       itemWidth: 50,
-      isShow: formData.data.contractType == "2",
+      // isShow: formData.data.contractType == "2",
     },
     // {
     //   type: "slot",
@@ -777,12 +797,12 @@ const formConfig = computed(() => {
       data: shippingMethod.value,
       itemWidth: 50,
     },
-    {
-      type: "input",
-      prop: "transportRemark",
-      label: "运输说明",
-      itemWidth: 50,
-    },
+    // {
+    //   type: "input",
+    //   prop: "transportRemark",
+    //   label: "运输说明",
+    //   itemWidth: 50,
+    // },
     // {
     //   type: "slot",
     //   slotName: "delivery",
@@ -851,7 +871,18 @@ const formConfig = computed(() => {
 const rules = ref({
   companyId: [{ required: true, message: "请选择生产公司", trigger: "change" }],
   contractType: [
-    { required: true, message: "请选择合同类型", trigger: "change" },
+    { required: true, message: "请选择订单类型", trigger: "change" },
+  ],
+  deliveryTime: [
+    { required: true, message: "请选择交货日期", trigger: "change" },
+  ],
+  belongType: [
+    { required: true, message: "请选择订单归属", trigger: "change" },
+  ],
+  merchUserId: [{ required: true, message: "请选择跟单员", trigger: "change" }],
+  isTax: [{ required: true, message: "请选择是否含税", trigger: "change" }],
+  isFreight: [
+    { required: true, message: "请选择是否含运费", trigger: "change" },
   ],
   sellCorporationId: [
     { required: true, message: "请选择卖方公司", trigger: "change" },
@@ -999,21 +1030,27 @@ getCityData("0");
 const sellCorporationIdChange = (val) => {
   if (val) {
     proxy.post("/corporation/detail", { id: val }).then((res) => {
-      if (formData.data.contractType == "2") {
-        formData.data.sellCountryName = res.countryName;
-        formData.data.sellProvinceName = res.provinceName;
-        formData.data.sellCityName = res.cityName;
-        formData.data.sellAddress = res.address;
-        formData.data.sellContactName = res.contactName;
-        formData.data.sellContactNumber = res.contactPhone;
-      } else {
-        formData.data.sellCountryName = res.countryEnStr;
-        formData.data.sellProvinceName = res.provinceEnStr;
-        formData.data.sellCityName = res.cityEnStr;
-        formData.data.sellAddress = res.addressEn;
-        formData.data.sellContactName = res.contactName;
-        formData.data.sellContactNumber = res.contactPhone;
-      }
+      formData.data.sellCountryName = res.countryName;
+      formData.data.sellProvinceName = res.provinceName;
+      formData.data.sellCityName = res.cityName;
+      formData.data.sellAddress = res.address;
+      formData.data.sellContactName = res.contactName;
+      formData.data.sellContactNumber = res.contactPhone;
+      // if (formData.data.contractType == "2") {
+      //   formData.data.sellCountryName = res.countryName;
+      //   formData.data.sellProvinceName = res.provinceName;
+      //   formData.data.sellCityName = res.cityName;
+      //   formData.data.sellAddress = res.address;
+      //   formData.data.sellContactName = res.contactName;
+      //   formData.data.sellContactNumber = res.contactPhone;
+      // } else {
+      //   formData.data.sellCountryName = res.countryEnStr;
+      //   formData.data.sellProvinceName = res.provinceEnStr;
+      //   formData.data.sellCityName = res.cityEnStr;
+      //   formData.data.sellAddress = res.addressEn;
+      //   formData.data.sellContactName = res.contactName;
+      //   formData.data.sellContactNumber = res.contactPhone;
+      // }
     });
   }
 };
@@ -1101,7 +1138,6 @@ const handleClickSelectMaterial = (index) => {
 
 const contractProductBomList = ref([]);
 const selectProduct = async (goods) => {
-  console.log(goods, "asaas");
   if (goods && goods.id) {
     let rowId = uuidv4();
     let allFile = [];
@@ -1480,31 +1516,42 @@ defineExpose({
 const changeShroffAccount = (val) => {
   if (val) {
     let data = accountList.value.find((item) => item.value == val);
-    if (formData.data.contractType == "2") {
-      if (data) {
-        formData.data.beneficiaryName = "";
-        formData.data.beneficiaryBank = "";
-        formData.data.beneficiaryBankAddress = "";
-        formData.data.beneficiaryAccountNumber = "";
-        formData.data.swiftCode = "";
-        formData.data.beneficiaryAddress = "";
-        formData.data.accountName = data.name;
-        formData.data.openingBank = data.openingBank;
-        formData.data.accountOpening = data.accountOpening;
-      }
-    } else {
-      if (data) {
-        formData.data.accountName = "";
-        formData.data.openingBank = "";
-        formData.data.accountOpening = "";
-        formData.data.beneficiaryName = data.beneficiaryName;
-        formData.data.beneficiaryBank = data.beneficiaryBank;
-        formData.data.beneficiaryBankAddress = data.beneficiaryBankAddress;
-        formData.data.beneficiaryAccountNumber = data.beneficiaryAccountNumber;
-        formData.data.swiftCode = data.swiftCode;
-        formData.data.beneficiaryAddress = data.beneficiaryAddress;
-      }
+    if (data) {
+      formData.data.beneficiaryName = "";
+      formData.data.beneficiaryBank = "";
+      formData.data.beneficiaryBankAddress = "";
+      formData.data.beneficiaryAccountNumber = "";
+      formData.data.swiftCode = "";
+      formData.data.beneficiaryAddress = "";
+      formData.data.accountName = data.name;
+      formData.data.openingBank = data.openingBank;
+      formData.data.accountOpening = data.accountOpening;
     }
+    // if (formData.data.contractType == "2") {
+    //   if (data) {
+    //     formData.data.beneficiaryName = "";
+    //     formData.data.beneficiaryBank = "";
+    //     formData.data.beneficiaryBankAddress = "";
+    //     formData.data.beneficiaryAccountNumber = "";
+    //     formData.data.swiftCode = "";
+    //     formData.data.beneficiaryAddress = "";
+    //     formData.data.accountName = data.name;
+    //     formData.data.openingBank = data.openingBank;
+    //     formData.data.accountOpening = data.accountOpening;
+    //   }
+    // } else {
+    //   if (data) {
+    //     formData.data.accountName = "";
+    //     formData.data.openingBank = "";
+    //     formData.data.accountOpening = "";
+    //     formData.data.beneficiaryName = data.beneficiaryName;
+    //     formData.data.beneficiaryBank = data.beneficiaryBank;
+    //     formData.data.beneficiaryBankAddress = data.beneficiaryBankAddress;
+    //     formData.data.beneficiaryAccountNumber = data.beneficiaryAccountNumber;
+    //     formData.data.swiftCode = data.swiftCode;
+    //     formData.data.beneficiaryAddress = data.beneficiaryAddress;
+    //   }
+    // }
   }
 };
 
@@ -1549,6 +1596,9 @@ const getAllData = (businessId) => {
     for (const key in res) {
       formData.data[key] = res[key];
     }
+    formData.data.belongType = formData.data.belongType + "";
+    formData.data.isFreight = formData.data.isFreight + "";
+    formData.data.isTax = formData.data.isTax + "";
     remarkEditor.value.changeHtml(formData.data.templateContent);
     if (
       formData.data.contractProductList &&
@@ -1691,6 +1741,7 @@ const getPriceSheetData = (id) => {
   proxy.post("/extQuotation/detail", { id }).then(async (res) => {
     formData.data = res;
     formData.data = {
+      contractType: route.query.contractType,
       templateContent: "",
       quotationId: res.id,
       companyId: res.companyId,
@@ -1701,15 +1752,15 @@ const getPriceSheetData = (id) => {
       buyContactNumber: res.buyContactNumber,
       amount: res.amount,
     };
-    if (res.type == 1) {
-      formData.data.contractType = "2";
-      if (currencyData.value && currencyData.value.length > 0) {
-        formData.data.currency = currencyData.value[0].dictKey;
-      }
-      formData.data.rate = 1;
-    } else {
-      formData.data.contractType = "1";
-    }
+    // if (res.type == 1) {
+    //   formData.data.contractType = "2";
+    //   if (currencyData.value && currencyData.value.length > 0) {
+    //     formData.data.currency = currencyData.value[0].dictKey;
+    //   }
+    //   formData.data.rate = 1;
+    // } else {
+    //   formData.data.contractType = "1";
+    // }
     formData.data.contractProductList = res.quotationProductList.map((x) => ({
       quotationProductId: x.id,
       fileUrl: "",
@@ -1785,7 +1836,7 @@ onMounted(() => {
   // 报价转销售订单
   if (route.query && route.query.priceSheetId) {
     getPriceSheetData(route.query.priceSheetId);
-    isEditList.value = route.query.isEditList;
+    isEditList.value = false;
   } else if (route.query && route.query.businessId && route.query.processType) {
     let businessId = route.query.businessId;
     getAllData(businessId);

+ 187 - 137
src/components/process/SF/ContractChange.vue

@@ -212,7 +212,7 @@
               </template>
             </el-table-column>
             <el-table-column prop="productCnName" label="商品名称" min-width="130" />
-            <el-table-column prop="productCode" label="商品编码" width="130" />
+            <el-table-column prop="productCode" label="商品编码" width="150" />
             <el-table-column label="尺寸 (cm)" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -220,7 +220,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="productColor" label="颜色" width="100" />
+            <el-table-column prop="productColor" label="颜色" width="140" />
             <el-table-column label="设计图稿" width="80">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -409,7 +409,7 @@
     </byForm>
 
     <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="产品库" width="90%" append-to-body>
-      <SelectProduct @selectProduct="selectProduct" :companyId="formData.data.companyId" :isRawMaterial="'1'"></SelectProduct>
+      <SelectProduct @selectProduct="selectProduct" :companyId="formData.data.companyId" :isRawMaterial="'1'" :disablePerm="'1'"></SelectProduct>
       <template #footer>
         <el-button @click="openProductCompany = false" size="defualt" v-debounce>关 闭</el-button>
       </template>
@@ -532,9 +532,13 @@ const formConfig = computed(() => {
     {
       type: "select",
       prop: "contractType",
-      label: "合同类型",
+      label: "订单类型",
       data: [
         {
+          dictKey: "3",
+          dictValue: "打样订单",
+        },
+        {
           dictKey: "2",
           dictValue: "常规订单",
         },
@@ -560,7 +564,7 @@ const formConfig = computed(() => {
     {
       type: "treeSelect",
       prop: "companyId",
-      label: "生产公司",
+      label: "工厂",
       data: treeData.value,
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
@@ -573,6 +577,22 @@ const formConfig = computed(() => {
     },
     {
       type: "select",
+      prop: "belongType",
+      label: "订单归属",
+      data: [
+        {
+          dictKey: "1",
+          dictValue: "归属工厂",
+        },
+        {
+          dictKey: "2",
+          dictValue: "归属业务",
+        },
+      ],
+      itemWidth: 50,
+    },
+    {
+      type: "select",
       prop: "merchUserId",
       label: "跟单员",
       data: userList.value,
@@ -600,40 +620,24 @@ const formConfig = computed(() => {
       title: "付款信息",
       haveLine: true,
     },
-    {
-      type: "select",
-      prop: "currency",
-      label: "币种",
-      data: currencyData.value,
-      itemWidth: 25,
-      disabled: formData.data.contractType == "2",
-    },
-    {
-      type: "number",
-      prop: "rate",
-      label: "汇率",
-      precision: 2,
-      min: 0,
-      controls: false,
-      itemWidth: 25,
-      disabled: formData.data.contractType == "2",
-    },
-    {
-      type: "select",
-      prop: "paymentMethod",
-      label: "付款方式",
-      data: fundsPaymentMethod.value,
-      itemWidth: 25,
-    },
-    {
-      type: "number",
-      prop: "advanceRatio",
-      label: "预付款比列(%)",
-      precision: 2,
-      min: 0,
-      controls: false,
-      itemWidth: 25,
-    },
+    // {
+    //   type: "select",
+    //   prop: "currency",
+    //   label: "币种",
+    //   data: currencyData.value,
+    //   itemWidth: 25,
+    //   disabled: formData.data.contractType == "2",
+    // },
+    // {
+    //   type: "number",
+    //   prop: "rate",
+    //   label: "汇率",
+    //   precision: 2,
+    //   min: 0,
+    //   controls: false,
+    //   itemWidth: 25,
+    //   disabled: formData.data.contractType == "2",
+    // },
     {
       type: "select",
       prop: "isTax",
@@ -667,6 +671,22 @@ const formConfig = computed(() => {
       itemWidth: 25,
     },
     {
+      type: "select",
+      prop: "paymentMethod",
+      label: "付款方式",
+      data: fundsPaymentMethod.value,
+      itemWidth: 25,
+    },
+    {
+      type: "number",
+      prop: "advanceRatio",
+      label: "预付款比列(%)",
+      precision: 2,
+      min: 0,
+      controls: false,
+      itemWidth: 25,
+    },
+    {
       type: "input",
       prop: "remark",
       label: "付款条件",
@@ -683,61 +703,61 @@ const formConfig = computed(() => {
         changeShroffAccount(val);
       },
     },
-    {
-      type: "input",
-      prop: "beneficiaryName",
-      label: " ",
-      placeholder: "请输入Beneficiary Name",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryAccountNumber",
-      label: " ",
-      placeholder: "请输入Beneficiary Account Number",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryBank",
-      label: " ",
-      placeholder: "请输入Beneficiary Bank",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "swiftCode",
-      label: " ",
-      placeholder: "请输入Swift Code",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryBankAddress",
-      label: " ",
-      placeholder: "请输入Beneficiary Bank Address",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryAddress",
-      label: " ",
-      placeholder: "请输入Beneficiary Address",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryName",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Name",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryAccountNumber",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Account Number",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryBank",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Bank",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "swiftCode",
+    //   label: " ",
+    //   placeholder: "请输入Swift Code",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryBankAddress",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Bank Address",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryAddress",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Address",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
     {
       type: "input",
       prop: "accountName",
       label: "户名",
       placeholder: "请输入户名",
       itemWidth: 50,
-      isShow: formData.data.contractType == "2",
+      // isShow: formData.data.contractType == "2",
     },
     {
       type: "input",
@@ -745,7 +765,7 @@ const formConfig = computed(() => {
       label: "开户行",
       placeholder: "请输入开户行",
       itemWidth: 50,
-      isShow: formData.data.contractType == "2",
+      // isShow: formData.data.contractType == "2",
     },
     {
       type: "input",
@@ -753,7 +773,7 @@ const formConfig = computed(() => {
       label: "账号",
       placeholder: "请输入账号",
       itemWidth: 50,
-      isShow: formData.data.contractType == "2",
+      // isShow: formData.data.contractType == "2",
     },
     // {
     //   type: "slot",
@@ -778,12 +798,12 @@ const formConfig = computed(() => {
       data: shippingMethod.value,
       itemWidth: 50,
     },
-    {
-      type: "input",
-      prop: "transportRemark",
-      label: "运输说明",
-      itemWidth: 50,
-    },
+    // {
+    //   type: "input",
+    //   prop: "transportRemark",
+    //   label: "运输说明",
+    //   itemWidth: 50,
+    // },
     // {
     //   type: "slot",
     //   slotName: "delivery",
@@ -852,7 +872,18 @@ const formConfig = computed(() => {
 const rules = ref({
   companyId: [{ required: true, message: "请选择生产公司", trigger: "change" }],
   contractType: [
-    { required: true, message: "请选择合同类型", trigger: "change" },
+    { required: true, message: "请选择订单类型", trigger: "change" },
+  ],
+  deliveryTime: [
+    { required: true, message: "请选择交货日期", trigger: "change" },
+  ],
+  belongType: [
+    { required: true, message: "请选择订单归属", trigger: "change" },
+  ],
+  merchUserId: [{ required: true, message: "请选择跟单员", trigger: "change" }],
+  isTax: [{ required: true, message: "请选择是否含税", trigger: "change" }],
+  isFreight: [
+    { required: true, message: "请选择是否含运费", trigger: "change" },
   ],
   sellCorporationId: [
     { required: true, message: "请选择卖方公司", trigger: "change" },
@@ -1000,21 +1031,27 @@ getCityData("0");
 const sellCorporationIdChange = (val) => {
   if (val) {
     proxy.post("/corporation/detail", { id: val }).then((res) => {
-      if (formData.data.contractType == "2") {
-        formData.data.sellCountryName = res.countryName;
-        formData.data.sellProvinceName = res.provinceName;
-        formData.data.sellCityName = res.cityName;
-        formData.data.sellAddress = res.address;
-        formData.data.sellContactName = res.contactName;
-        formData.data.sellContactNumber = res.contactPhone;
-      } else {
-        formData.data.sellCountryName = res.countryEnStr;
-        formData.data.sellProvinceName = res.provinceEnStr;
-        formData.data.sellCityName = res.cityEnStr;
-        formData.data.sellAddress = res.addressEn;
-        formData.data.sellContactName = res.contactName;
-        formData.data.sellContactNumber = res.contactPhone;
-      }
+      formData.data.sellCountryName = res.countryName;
+      formData.data.sellProvinceName = res.provinceName;
+      formData.data.sellCityName = res.cityName;
+      formData.data.sellAddress = res.address;
+      formData.data.sellContactName = res.contactName;
+      formData.data.sellContactNumber = res.contactPhone;
+      // if (formData.data.contractType == "2") {
+      //   formData.data.sellCountryName = res.countryName;
+      //   formData.data.sellProvinceName = res.provinceName;
+      //   formData.data.sellCityName = res.cityName;
+      //   formData.data.sellAddress = res.address;
+      //   formData.data.sellContactName = res.contactName;
+      //   formData.data.sellContactNumber = res.contactPhone;
+      // } else {
+      //   formData.data.sellCountryName = res.countryEnStr;
+      //   formData.data.sellProvinceName = res.provinceEnStr;
+      //   formData.data.sellCityName = res.cityEnStr;
+      //   formData.data.sellAddress = res.addressEn;
+      //   formData.data.sellContactName = res.contactName;
+      //   formData.data.sellContactNumber = res.contactPhone;
+      // }
     });
   }
 };
@@ -1478,31 +1515,42 @@ defineExpose({
 const changeShroffAccount = (val) => {
   if (val) {
     let data = accountList.value.find((item) => item.value == val);
-    if (formData.data.contractType == "2") {
-      if (data) {
-        formData.data.beneficiaryName = "";
-        formData.data.beneficiaryBank = "";
-        formData.data.beneficiaryBankAddress = "";
-        formData.data.beneficiaryAccountNumber = "";
-        formData.data.swiftCode = "";
-        formData.data.beneficiaryAddress = "";
-        formData.data.accountName = data.name;
-        formData.data.openingBank = data.openingBank;
-        formData.data.accountOpening = data.accountOpening;
-      }
-    } else {
-      if (data) {
-        formData.data.accountName = "";
-        formData.data.openingBank = "";
-        formData.data.accountOpening = "";
-        formData.data.beneficiaryName = data.beneficiaryName;
-        formData.data.beneficiaryBank = data.beneficiaryBank;
-        formData.data.beneficiaryBankAddress = data.beneficiaryBankAddress;
-        formData.data.beneficiaryAccountNumber = data.beneficiaryAccountNumber;
-        formData.data.swiftCode = data.swiftCode;
-        formData.data.beneficiaryAddress = data.beneficiaryAddress;
-      }
+    if (data) {
+      formData.data.beneficiaryName = "";
+      formData.data.beneficiaryBank = "";
+      formData.data.beneficiaryBankAddress = "";
+      formData.data.beneficiaryAccountNumber = "";
+      formData.data.swiftCode = "";
+      formData.data.beneficiaryAddress = "";
+      formData.data.accountName = data.name;
+      formData.data.openingBank = data.openingBank;
+      formData.data.accountOpening = data.accountOpening;
     }
+    // if (formData.data.contractType == "2") {
+    //   if (data) {
+    //     formData.data.beneficiaryName = "";
+    //     formData.data.beneficiaryBank = "";
+    //     formData.data.beneficiaryBankAddress = "";
+    //     formData.data.beneficiaryAccountNumber = "";
+    //     formData.data.swiftCode = "";
+    //     formData.data.beneficiaryAddress = "";
+    //     formData.data.accountName = data.name;
+    //     formData.data.openingBank = data.openingBank;
+    //     formData.data.accountOpening = data.accountOpening;
+    //   }
+    // } else {
+    //   if (data) {
+    //     formData.data.accountName = "";
+    //     formData.data.openingBank = "";
+    //     formData.data.accountOpening = "";
+    //     formData.data.beneficiaryName = data.beneficiaryName;
+    //     formData.data.beneficiaryBank = data.beneficiaryBank;
+    //     formData.data.beneficiaryBankAddress = data.beneficiaryBankAddress;
+    //     formData.data.beneficiaryAccountNumber = data.beneficiaryAccountNumber;
+    //     formData.data.swiftCode = data.swiftCode;
+    //     formData.data.beneficiaryAddress = data.beneficiaryAddress;
+    //   }
+    // }
   }
 };
 
@@ -1542,12 +1590,14 @@ const getAllData = (businessId) => {
     res.provinceId = res.buyProvinceId;
     res.cityId = res.buyCityId;
     if (res.grossProfitInfoList && res.grossProfitInfoList.length > 0) {
-      console.log(res.grossProfitInfoList, "adas");
       $bus.emit("getGrossData", res.grossProfitInfoList);
     }
     for (const key in res) {
       formData.data[key] = res[key];
     }
+    formData.data.belongType = formData.data.belongType + "";
+    formData.data.isFreight = formData.data.isFreight + "";
+    formData.data.isTax = formData.data.isTax + "";
     remarkEditor.value.changeHtml(formData.data.templateContent);
     if (
       formData.data.contractProductList &&

+ 7 - 0
src/components/product/SelectProduct.vue

@@ -113,6 +113,10 @@ const props = defineProps({
     type: String,
     default: "",
   },
+  disablePerm: {
+    type: String,
+    default: "",
+  },
 });
 const tableHeight = ref(0);
 const getTableHeight = () => {
@@ -749,6 +753,9 @@ if (props && props.companyId) {
 if (props && props.isRawMaterial) {
   sourceList.value.pagination.isRawMaterial = props.isRawMaterial;
 }
+if (props && props.disablePerm) {
+  sourceList.value.pagination.disablePerm = props.disablePerm;
+}
 
 getList();
 const clickSelect = (item) => {

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

@@ -242,7 +242,7 @@ const handleMouseOver = (data) => {
 };
 
 const getShowIcon = (data) => {
-  let ids = [100, 200, 300];
+  let ids = ["100", "200", "300", "400"];
   return !ids.includes(data.id);
 };
 </script>

+ 112 - 27
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -102,11 +102,11 @@
       </template>
     </el-dialog>
 
-    <el-dialog :title="'BOM 配置'" v-model="bomDialog" width="60%" destroy-on-close>
+    <el-dialog :title="'BOM 配置'" v-model="bomDialog" width="900" destroy-on-close>
       <!-- <div class="public_height_dialog"> -->
       <byForm :formConfig="bomFormConfig" :formOption="bomFormOption" v-model="formData.bomData" :rules="bomRules" ref="bomFormDom"
               v-loading="submitLoading">
-        <template #accessories>
+        <!-- <template #accessories>
           <div style="width: 100%">
             <el-button type="primary" @click="openSelectMaterial = true" plain>选择</el-button>
             <el-table :data="formData.bomData.productBomDetailList" style="width: 100%; margin-top: 16px" border>
@@ -140,6 +140,68 @@
               <el-table-column prop="name" label="工序名称" />
             </el-table>
           </div>
+        </template> -->
+
+        <template #detail>
+          <div style="width: 100%">
+            <div style="text-align:center;margin-bottom:10px">
+              【{{formData.bomData.name}} {{formData.bomData.code}}】BOM单
+            </div>
+            <table border class="table" style="width:100%">
+              <tbody>
+                <tr>
+                  <td style="width:90px">原材料</td>
+                  <td style="padding:10px">
+                    <el-select v-model="formData.bomData.rawMaterialId" placeholder="请选择原材料" style="width:100%">
+                      <el-option v-for="item in rawMaterialData" :key="item.value" :label="item.label" :value="item.value" filterable />
+                    </el-select>
+                  </td>
+                </tr>
+                <tr>
+                  <td>
+                    包材辅材
+                  </td>
+                  <td style="padding:20px 20px 20px">
+                    <div style="text-align:left"><el-button type="primary" @click="openSelectMaterial = true" plain>选择</el-button></div>
+                    <el-table :data="formData.bomData.productBomDetailList" style="width: 100%;">
+                      <el-table-column prop="materialName" label="物料名称" min-width="130" />
+                      <el-table-column prop="materialCode" label="物料编码" width="150" />
+                      <el-table-column label="数量" width="150">
+                        <template #default="{ row, $index }">
+                          <div style="width: 100%">
+                            <el-form-item :prop="'productBomDetailList.' + $index + '.quantity'" :rules="bomRules.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="1" />
+                            </el-form-item>
+                          </div>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="操作" width="60" align="center" fixed="right">
+                        <template #default="{ $index }">
+                          <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+                        </template>
+                      </el-table-column>
+                    </el-table>
+                  </td>
+                </tr>
+
+                <tr>
+                  <td>
+                    生产工序
+                  </td>
+                  <td style="padding:0 20px 20px">
+                    <el-table :data="formData.bomData.processesList" style="width: 100%; ">
+                      <el-table-column label="序号" type="index" width="80" />
+                      <el-table-column prop="code" label="工序编码" />
+                      <el-table-column prop="name" label="工序名称" />
+                    </el-table>
+                  </td>
+                </tr>
+              </tbody>
+
+            </table>
+          </div>
         </template>
 
       </byForm>
@@ -767,7 +829,18 @@ const getDtl = (row) => {
 const rawMaterialData = ref([]);
 const getRawMaterialData = () => {
   proxy.post("/productInfo/page", { productClassifyId: 100 }).then((res) => {
-    rawMaterialData.value = res.rows;
+    rawMaterialData.value = res.rows.map((x) => ({
+      ...x,
+      label:
+        x.name +
+        "," +
+        x.customCode +
+        "," +
+        `${x["length"]}*${x.width}*${x.height}(cm)` +
+        "," +
+        x.color,
+      value: x.id,
+    }));
   });
 };
 getRawMaterialData();
@@ -781,33 +854,33 @@ const bomFormOption = reactive({
 });
 const bomFormConfig = computed(() => {
   return [
-    {
-      type: "title1",
-      title: "BOM 信息",
-    },
-    {
-      type: "select",
-      prop: "rawMaterialId",
-      label: "原材料",
-      itemWidth: 100,
-      data: rawMaterialData.value,
-      filterable: true,
-      disabled: false,
-    },
-    {
-      type: "slot",
-      slotName: "accessories",
-      label: "包材辅料",
-      itemWidth: 100,
-    },
-    {
-      type: "title1",
-      title: "生产工序",
-    },
+    // {
+    //   type: "title1",
+    //   title: "BOM 信息",
+    // },
+    // {
+    //   type: "select",
+    //   prop: "rawMaterialId",
+    //   label: "原材料",
+    //   itemWidth: 100,
+    //   data: rawMaterialData.value,
+    //   filterable: true,
+    //   disabled: false,
+    // },
+    // {
+    //   type: "slot",
+    //   slotName: "accessories",
+    //   label: "包材辅料",
+    //   itemWidth: 100,
+    // },
+    // {
+    //   type: "title1",
+    //   title: "生产工序",
+    // },
     {
       type: "slot",
       slotName: "detail",
-      label: " ",
+      label: "",
     },
   ];
 });
@@ -821,6 +894,8 @@ const bomSetting = (row) => {
   bomDialog.value = true;
   proxy.post("/productBomInfo/detail", { id: row.id }).then((res) => {
     formData.bomData = {
+      name: row.name,
+      code: row.customCode,
       id: res.id,
       rawMaterialId: res.rawMaterialId,
       productBomDetailList: [],
@@ -961,4 +1036,14 @@ const exportExcel = () => {
   cursor: pointer;
   vertical-align: middle;
 }
+.table {
+  border-collapse: collapse;
+  border-spacing: 0;
+
+  td {
+    text-align: center;
+    padding: 2px 4px;
+    // padding: 5px 10px;
+  }
+}
 </style>

+ 9 - 8
src/views/EHSD/saleContract/PriceSheetDetail.vue

@@ -231,21 +231,22 @@ const formConfig = computed(() => {
     // },
     {
       type: "title1",
-      title: "报价类型",
+      title: "基本信息",
     },
     {
       type: "input",
       prop: "code",
       label: "报价单号",
-      isShow: formData.data.code ? true : false,
-    },
-    {
-      type: "select",
-      prop: "type",
-      label: "报价类型",
-      data: typeData.value,
       itemWidth: 50,
+      isShow: formData.data.code ? true : false,
     },
+    // {
+    //   type: "select",
+    //   prop: "type",
+    //   label: "报价类型",
+    //   data: typeData.value,
+    //   itemWidth: 50,
+    // },
     {
       type: "treeSelect",
       prop: "companyId",

+ 235 - 171
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -23,6 +23,14 @@
           </div>
         </template>
 
+        <template #contractType="{ item }">
+          <div style="width: 100%">
+            <span>
+              {{ dictKeyValue(item.contractType, contractType) }}
+            </span>
+          </div>
+        </template>
+
         <template #produceStatus="{ item }">
           <div style="width: 100%">
             <span v-if="item.produceStatus==0 || item.produceStatus" :class="item.produceStatus==10?'tag-active':'tag-active-1'">
@@ -75,12 +83,12 @@
 
         <template #deliveryTime="{ item }">
           <div style="width: 100%;display:flex;align-items:center">
-            <el-icon v-if="item.orderDistributeStatus==1" :size="16" style="cursor:pointer;margin-right: 8px;" color="#409EFF"
+            <el-icon v-if="item.orderDistributeStatus==1 && item.deliveryTime" :size="16" style="cursor:pointer;margin-right: 8px;" color="#409EFF"
                      @click="clickDistributeProduction(item)">
               <Edit />
             </el-icon>
-            <div>
-              {{item.deliveryTime}}
+            <div v-if="item.deliveryTime">
+              {{item.deliveryTime.slice(0,10)}}
             </div>
           </div>
         </template>
@@ -307,11 +315,11 @@ const produceStatusData = ref([
     value: "0",
   },
   {
-    label: "进行中",
+    label: "生产中",
     value: "1",
   },
   {
-    label: "完成",
+    label: "生产完成",
     value: "2",
   },
   {
@@ -353,6 +361,32 @@ const status = ref([
     value: 99,
   },
 ]);
+
+const contractType = ref([
+  {
+    dictKey: "3",
+    dictValue: "打样订单",
+  },
+  {
+    dictKey: "2",
+    dictValue: "常规订单",
+  },
+  {
+    dictKey: "1",
+    dictValue: "出口退税订单",
+  },
+]);
+
+const belongTypeData = ref([
+  {
+    dictKey: "1",
+    dictValue: "归属工厂",
+  },
+  {
+    dictKey: "2",
+    dictValue: "归属业务",
+  },
+]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -368,7 +402,7 @@ const sourceList = ref({
     endTime: "",
     deliveryTimeSta: "",
     deliveryTimeEnd: "",
-    type: route.query.pageType,
+    type: "",
     produceStatus: "",
   },
 });
@@ -376,12 +410,17 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
+      label: "订单类型",
+      prop: "contractType",
+      data: contractType.value,
+    },
+    {
       label: "审批状态",
       prop: "status",
       data: status.value,
     },
     {
-      label: "生产公司",
+      label: "工厂",
       prop: "companyId",
       data: companyData.value,
     },
@@ -468,6 +507,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "订单类型",
+        slot: "contractType",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "合同号",
         slot: "code",
         width: 140,
@@ -475,13 +521,23 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "生产公司",
+        label: "工厂",
         prop: "companyName",
         width: 120,
       },
     },
     {
       attrs: {
+        label: "订单归属",
+        prop: "belongType",
+        width: 80,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, belongTypeData.value);
+      },
+    },
+    {
+      attrs: {
         label: "生产状态",
         // prop: "produceStatus",
         slot: "produceStatus",
@@ -519,7 +575,7 @@ const config = computed(() => {
       attrs: {
         label: "交期",
         slot: "deliveryTime",
-        width: 180,
+        width: 120,
       },
     },
     {
@@ -653,170 +709,176 @@ const config = computed(() => {
         fixed: "right",
       },
       renderHTML(row) {
-        return [
-          row.status == 30 &&
-          (row.orderDistributeStatus == 0 || row.orderDistributeStatus == 2)
-            ? {
-                attrs: {
-                  label: "生产",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  clickDistributeProduction(row);
-                },
-              }
-            : {},
+        return proxy.isCurrentCompanyData(row.ofCompanyId)
+          ? [
+              row.status == 30 &&
+              (row.orderDistributeStatus == 0 || row.orderDistributeStatus == 2)
+                ? {
+                    attrs: {
+                      label: "生产",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickDistributeProduction(row);
+                    },
+                  }
+                : {},
 
-          route.query.pageType == "1"
-            ? {
-                attrs: {
-                  label: "转销售订单",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  trunContract(row);
-                },
-              }
-            : {},
-          row.status == 30 && row.outboundStatus == 0
-            ? {
-                attrs: {
-                  label: "销售出库",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  proxy
-                    .msgConfirm()
-                    .then((res) => {
+              route.query.pageType == "1"
+                ? {
+                    attrs: {
+                      label: "转销售订单",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      trunContract(row);
+                    },
+                  }
+                : {},
+              row.status == 30 &&
+              row.outboundStatus == 0 &&
+              row.produceStatus == 2
+                ? {
+                    attrs: {
+                      label: "销售出库",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
                       proxy
-                        .post("/contract/saleOutbound", {
-                          id: row.id,
-                        })
+                        .msgConfirm()
                         .then((res) => {
-                          proxy.msgTip("操作成功", 1);
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
-                },
-              }
-            : {},
-          row.status == 30 && row.produceStatus != 10
-            ? {
-                attrs: {
-                  label: "变更",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  clickAlteration(row);
-                },
-              }
-            : {},
+                          proxy
+                            .post("/contract/saleOutbound", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+              row.status == 30 && row.produceStatus != 10
+                ? {
+                    attrs: {
+                      label: "变更",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickAlteration(row);
+                    },
+                  }
+                : {},
 
-          row.status == 30
-            ? {
-                attrs: {
-                  label: "打印",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  clickPrint(row);
-                },
-              }
-            : {},
-          // row.orderDistributeStatus == 1
-          //   ? {}
-          //   :
-          row.status == 10 ||
-          (row.status == 30 && Number(row.sumClaimMoney) == 0)
-            ? {
-                attrs: {
-                  label: "作废",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  proxy
-                    .msgConfirm()
-                    .then((res) => {
+              row.status == 30
+                ? {
+                    attrs: {
+                      label: "打印",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickPrint(row);
+                    },
+                  }
+                : {},
+              // row.orderDistributeStatus == 1
+              //   ? {}
+              //   :
+              row.status == 10 ||
+              (row.status == 30 && Number(row.sumClaimMoney) == 0)
+                ? {
+                    attrs: {
+                      label: "作废",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
                       proxy
-                        .post("/contract/cancellation", {
-                          id: row.id,
-                        })
+                        .msgConfirm()
                         .then((res) => {
-                          proxy.msgTip("操作成功", 1);
+                          proxy
+                            .post("/contract/cancellation", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
 
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
-                },
-              }
-            : {},
-          row.status == 30
-            ? {
-                attrs: {
-                  label: "结清",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  ElMessageBox.confirm("是否确认结清?", "提示", {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning",
-                  }).then(() => {
-                    proxy
-                      .post("/contract/settle", {
-                        id: row.id,
-                      })
-                      .then(() => {
-                        ElMessage({
-                          message: "操作成功",
-                          type: "success",
-                        });
-                        getList();
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+              row.status == 30 && row.isSettled == "0"
+                ? {
+                    attrs: {
+                      label: "结清",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      ElMessageBox.confirm("是否确认结清?", "提示", {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning",
+                      }).then(() => {
+                        proxy
+                          .post("/contract/settle", {
+                            id: row.id,
+                          })
+                          .then(() => {
+                            ElMessage({
+                              message: "操作成功",
+                              type: "success",
+                            });
+                            getList();
+                          });
                       });
-                  });
-                },
-              }
-            : {},
-          // {
-          //   attrs: {
-          //     label: "生产指示",
-          //     type: "primary",
-          //     text: true,
-          //   },
-          //   el: "button",
-          //   click() {
-          //     handleEditTag(row);
-          //   },
-          // },
-          {
-            attrs: {
-              label: "售后",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              openRecords.value = true;
-              getRecordsData(row);
-            },
-          },
-        ];
+                    },
+                  }
+                : {},
+              // {
+              //   attrs: {
+              //     label: "生产指示",
+              //     type: "primary",
+              //     text: true,
+              //   },
+              //   el: "button",
+              //   click() {
+              //     handleEditTag(row);
+              //   },
+              // },
+              row.isSettled == "1"
+                ? {
+                    attrs: {
+                      label: "售后",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      openRecords.value = true;
+                      getRecordsData(row);
+                    },
+                  }
+                : {},
+            ]
+          : [];
       },
     },
   ];
@@ -939,7 +1001,8 @@ if (route.query.code) {
 }
 getList();
 const newContract = () => {
-  let flowKey = route.query.pageType == "1" ? "sample_flow" : "contract_flow";
+  // let flowKey = route.query.pageType == "1" ? "sample_flow" : "contract_flow" ;
+  let flowKey = "contract_flow";
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
     query: {
@@ -1216,8 +1279,9 @@ const printObj = ref({
 });
 
 const clickAlteration = (row) => {
-  let flowKey =
-    route.query.pageType == "1" ? "sample_update_flow" : "contract_update_flow";
+  // let flowKey =
+  //   route.query.pageType == "1" ? "sample_update_flow" : "contract_update_flow";
+  let flowKey = "contract_update_flow";
   proxy.$router.push({
     path: "/platform_manage/process/processApproval",
     query: {
@@ -1363,7 +1427,7 @@ const formSearchConfig = computed(() => {
     },
     {
       type: "select",
-      label: "生产公司",
+      label: "工厂",
       prop: "companyId",
       itemWidth: 50,
       data: companyData.value,
@@ -1423,7 +1487,7 @@ const productionFormConfig = computed(() => [
   {
     type: "treeSelect",
     prop: "produceCompanyId",
-    label: "生产公司",
+    label: "工厂",
     data: companyData.value,
     propsTreeLabel: "deptName",
     propsTreeValue: "deptId",
@@ -1441,7 +1505,7 @@ const productionFormConfig = computed(() => [
   },
   {
     type: "date",
-    itemType: "datetime",
+    itemType: "datet",
     label: "交期",
     prop: "deliveryPeriod",
     // placeholder: "合同开始时间",

+ 18 - 3
src/views/EHSD/saleContract/performanceSet/index.vue

@@ -53,6 +53,13 @@ const selectConfig = computed(() => [
 const config = ref([
   {
     attrs: {
+      label: "公司名称",
+      prop: "companyName",
+      width: 100,
+    },
+  },
+  {
+    attrs: {
       label: "部门名称",
       prop: "deptName",
       width: 100,
@@ -169,7 +176,15 @@ getList();
 
 const objectSpanMethod = ({ rowIndex, columnIndex }) => {
   if (columnIndex === 0) {
-    const _row = flitterData(sourceList.value.data).one[rowIndex];
+    const _row = flitterData(sourceList.value.data, "companyId").one[rowIndex];
+    const _col = _row > 0 ? 1 : 0;
+    return {
+      rowspan: _row,
+      colspan: _col,
+    };
+  }
+  if (columnIndex === 1) {
+    const _row = flitterData(sourceList.value.data, "deptId").one[rowIndex];
     const _col = _row > 0 ? 1 : 0;
     return {
       rowspan: _row,
@@ -177,7 +192,7 @@ const objectSpanMethod = ({ rowIndex, columnIndex }) => {
     };
   }
 };
-const flitterData = (arr) => {
+const flitterData = (arr, att) => {
   let spanOneArr = [];
   let concatOne = 0;
   arr.forEach((item, index) => {
@@ -185,7 +200,7 @@ const flitterData = (arr) => {
       spanOneArr.push(1);
     } else {
       //注意这里的quarterly是表格绑定的字段,根据自己的需求来改
-      if (item.deptId === arr[index - 1].deptId) {
+      if (item[att] === arr[index - 1][att]) {
         //第一列需合并相同内容的判断条件
         spanOneArr[concatOne] += 1;
         spanOneArr.push(0);

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

@@ -905,15 +905,15 @@ const formConfig = computed(() => {
     },
     {
       type: "title1",
-      title: "报价类型",
-    },
-    {
-      type: "select",
-      prop: "type",
-      label: "报价类型",
-      data: typeData.value,
-      itemWidth: 50,
+      title: "基本信息",
     },
+    // {
+    //   type: "select",
+    //   prop: "type",
+    //   label: "报价类型",
+    //   data: typeData.value,
+    //   itemWidth: 50,
+    // },
     {
       type: "treeSelect",
       prop: "companyId",

+ 5 - 3
src/views/EHSD/saleContract/priceSheetForeign/index.vue

@@ -579,15 +579,17 @@ const clickMore = (row) => {
 };
 
 const handleGenerate = (row, flag) => {
-  let flowKey = flag ? "sample_flow" : "contract_flow";
+  // let flowKey = flag ? "sample_flow" : "contract_flow";
+  let contractType = flag ? "3" : "2";
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
     query: {
       priceSheetId: row.id,
-      flowKey: flowKey,
+      flowKey: "contract_flow",
       flowName: "订单流程",
       random: proxy.random(),
-      isEditList: flag,
+      isEditList: false,
+      contractType,
     },
   });
   detailDialog.value = false;

+ 136 - 384
src/views/MES/processScheduling/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="pageIndexClass" style="display:flex">
-      <div style="width:calc(65% - 10px);margin-right:10px">
+      <div style="width:calc(60% - 10px);margin-right:10px">
         <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                  :selectConfig="selectConfig" :action-list="[ 
               
@@ -64,9 +64,17 @@
 
           <template v-for="(slotItem, index) in processesData" v-slot:[slotItem.id]="{ item }" :key="slotItem.id">
             <div style="width:100%">
-              <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)}}
+              <span v-if="isShowCotent(slotItem,item)" style="font-size:12px">
+                <div style="text-align:center"><el-button type="primary" @click="openModal(item,slotItem)" text>排程</el-button></div>
+
+                <div :style="{
+                  color:isFindCotentData(slotItem,item).schedulingCount>=item.quantity?'#70cd31':''
+                }">
+                  <div v-for="record in isFindCotentData(slotItem,item).schedulingList" :key="record.id"
+                       style="line-height:22px;display:flex;justify-content:space-between">
+                    <span v-if="record.schedulingDate">{{record.schedulingDate.slice(5,10)}}</span> <span>{{record.quantity}}</span>
+                  </div>
+                </div>
               </span>
               <div v-else class="no-bk">
                 -
@@ -75,16 +83,10 @@
           </template>
         </byTable>
       </div>
-      <div style="width:35%">
+      <div style="width:40%">
         <div class="schedule-right">
           <div class="schedule-top">
             <el-row>
-              <!-- <el-col :span="10" style="text-align: left">
-            <el-select v-model="status" style="width: 110px">
-              <el-option v-for="item in tableStatus" :key="item.value" :label="item.label" :value="item.value" />
-            </el-select>
-            <el-button type="info" style="margin-left: 8px" @click="clickToday()" plain>今日</el-button>
-          </el-col> -->
               <el-col :span="24" style="text-align: center; height: 32px; line-height: 32px">
                 <div style="display: flex; justify-content: space-between">
                   <el-button @click="clickToday()" plain>今日</el-button>
@@ -93,9 +95,6 @@
                   <el-button :icon="ArrowRightBold" @click="nextMonth()" />
                 </div>
               </el-col>
-              <!-- <el-col :span="10" style="text-align: right">
-            <el-button type="primary" @click="newSchedule()">新建日程</el-button>
-          </el-col> -->
             </el-row>
           </div>
           <div class="schedule-bottom">
@@ -106,33 +105,16 @@
                     {{ data.day.substr(8, 10) }}
                   </div>
                   <div style="width:100%">
-                    <div v-for="item in processesData" :key="item.id">
-                      {{item.name}}:99999
-                    </div>
-                  </div>
-                  <!-- <el-popover placement="left" :width="400" style="height" trigger="hover" @show="onShow(data.day)">
-                    <template #reference>
-                      <div v-if="isShow(data.day)">
-                        <div style="height:5px;margin-bottom:5px;border-radius:2px" v-for="(item,index) in judgeDay(data.day)" :key="index"
-                             :style="{ background: colorData[item]}">
-                        </div>
-                      </div>
-                    </template>
-                    <div style="height:500px;overflow:auto">
-                      <div v-for="item in showData" :key="item" style="margin-bottom:20px">
-                        <div style="display:flex">
-                          <div>颜色:</div>
-                          <div :style="{ background: colorData[item]}" style="width:20px;height:20px;border-radius:10px"></div>
-                        </div>
-                        <div>
-                          订单号:<span v-if="rightDataObj[item]">{{rightDataObj[item]['code']}}</span>
-                        </div>
-                        <div>
-                          产品:<span v-if="rightDataObj[item]">{{rightDataObj[item]['productName']}}</span>
-                        </div>
+                    <div v-for="process in processesData" :key="process.id">
+                      <div style="display:flex;justify-content:space-between;align-items:center;margin:3px 0;height:22px">
+                        <span> {{process.name}}</span>
+                        <span v-if="isShowDayData(data.day,process)" class="tag-active" style="display:inline-block;min-width:45px;text-align:right;">
+                          {{isShowDayData(data.day,process).quantity}}
+                        </span>
+                        <!-- {{item.quantity}} -->
                       </div>
                     </div>
-                  </el-popover> -->
+                  </div>
                 </div>
               </template>
             </el-calendar>
@@ -140,201 +122,15 @@
         </div>
       </div>
     </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">
-        <div id="pdfDom" style="width:100%">
-          <!-- <div style="font-size:20px;text-align:center">
-            {{printData.name}}
-          </div> -->
-          <div v-for="item in printList" :key="item.id" style="margin-bottom:20px">
-            <div style="font-size:32px;font-weight:700;color:#000;text-align:center">
-              生产任务单
-            </div>
-            <div style="float:right;margin: 20px 0px 5px 0;">
-              {{printTime}}
-            </div>
-            <table class="table" border>
-              <tr>
-                <td style="width:25%">
-                  <div :ref="item.id">
-                  </div>
-                </td>
-                <td style="width:75%">
-                  <div style="display:flex;margin-bottom:10px">
-                    <div style="width:50%">
-                      <div class="top-title">
-                        订单号
-                      </div>
-                      <div>
-                        {{item.orderCode}}
-                      </div>
-                    </div>
-                    <div style="width:50%">
-                      <div class="top-title">
-                        交期
-                      </div>
-                      <div v-if="item.deliveryPeriod">
-                        {{item.deliveryPeriod.substr(0,10)}}
-                      </div>
-                    </div>
-                  </div>
-                  <div style="display:flex;margin-bottom:10px">
-                    <div style="width:50%">
-                      <div class="top-title">
-                        产品编码
-                      </div>
-                      <div>
-                        {{item.productCode}}
-                      </div>
-                    </div>
-                    <div style="width:50%">
-                      <div class="top-title">
-                        生产数量
-                      </div>
-                      <div>
-                        {{item.quantity}}
-                      </div>
-                    </div>
-                  </div>
-                  <div style="margin-bottom:10px">
-                    <div class="top-title">
-                      产品名称
-                    </div>
-                    <div>
-                      {{item.productName}}
-                    </div>
-                  </div>
-                  <div style="margin-bottom:10px">
-                    <div class="top-title">
-                      产品尺寸(cm)
-                    </div>
-                    <div>
-                      {{item.productLength}} * {{item.productWidth}} * {{item.productHeight}}
-                    </div>
-                  </div>
-                </td>
-              </tr>
-              <tr>
-                <td style="text-align:center" rowspan="4">
-                  <div>
-                    <div style="font-weight:700">产品图</div>
-                    <img v-if="item.fileList &&item.fileList.length > 0" class="bigImg" :src="item.fileList[0].fileUrl" alt="">
-                  </div>
-                  <div style="margin-top:20px">
-                    <div style="font-weight:700">设计图</div>
-                    <img v-if="item.fileListOne &&item.fileListOne.length > 0" class="bigImg" :src="item.fileListOne[0].fileUrl" alt="">
-                  </div>
-                </td>
-                <td style="height:60px;vertical-align:top">
-                  <div>
-                    <div class="top-title">
-                      产品备注
-                    </div>
-                    <div>
-                      {{item.productRemark}}
-                    </div>
-                  </div>
-                </td>
-              </tr>
-              <tr>
-                <td style="height:60px;vertical-align:top">
-                  <div class="top-title">
-                    生产工序
-                  </div>
-                  <div>
-                    <!-- <el-checkbox v-for="proess in item.productionTaskProgressList" :key="proess.processesId" :label="proess.progressName"
-                                 size="small" /> -->
-                    <span v-for="(proess,index) in item.productionTaskProgressList" :key="proess.processesId">{{proess.progressName}} <span
-                            v-if="index<item.productionTaskProgressList.length-1"> > </span> </span>
-                  </div>
-                </td>
-              </tr>
-              <tr>
-                <td style="height:107px">
-                  <div style="margin-bottom:10px">
-                    <div class="top-title">
-                      原材料编码
-                    </div>
-                    <div>
-                      {{item.rawMaterialCode}}
-                    </div>
-                  </div>
-                  <div>
-                    <div class="top-title">
-                      原材料名称
-                    </div>
-                    <div>
-                      {{item.rawMaterialName}}
-                    </div>
-                  </div>
-                </td>
-              </tr>
-              <tr>
-                <td style="vertical-align:top">
-                  <div class="top-title">BOM</div>
-                  <div>
-                    <table border class="table son">
-                      <tr>
-                        <td style="width:85%">名称</td>
-                        <!-- <td style="width:15%">单价</td> -->
-                        <td style="width:15%">数量</td>
-                      </tr>
-                      <tr v-for="son in item.contractProductBomList" :key="son.id">
-                        <td>
-                          <div>
-                            {{son.productCode}}
-                          </div>
-                          <div>
-                            {{son.productName}}
-                          </div>
-                        </td>
-                        <!-- <td>{{son.price}}</td> -->
-                        <td>{{son.quantity}}</td>
-                      </tr>
-                    </table>
-                  </div>
-                </td>
-              </tr>
-
-            </table>
-            <div style="page-break-after: always"></div>
-          </div>
-        </div>
-      </div>
-      <template #footer>
-        <el-button @click="dialogVisible = false" size="defualt">取 消</el-button>
-        <el-button type="primary" v-print="printObj" size="defualt">打 印</el-button>
-      </template>
-    </el-dialog>
-
-    <el-dialog title="备注" v-model="remarkDialog" width="500" destroy-on-close v-if="remarkDialog">
+    <el-dialog :title="'排程'" v-model="dialogVisible" width="500" destroy-on-close>
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
       </byForm>
       <template #footer>
-        <el-button @click="remarkDialog = false" size="defualt" v-debounce>取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="defualt" v-debounce>
-          确 定
-        </el-button>
+        <el-button @click="dialogVisible = false" size="defualt">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="defualt">提 交</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog title="记录查看" v-model="recordDialog" width="70%" destroy-on-close v-if="recordDialog">
-      <byForm :formConfig="recordFormConfig" :formOption="recordFormOption" v-model="formData.recordData">
-        <template #detail1>
-          <div style="width:100%">
-            a
-          </div>
-        </template>
-        <template #detail2>
-          <div style="width:100%">
-            b
-          </div>
-        </template>
-      </byForm>
-      <template #footer>
-        <el-button @click="recordDialog = false" size="defualt" v-debounce>关闭</el-button>
-      </template>
-    </el-dialog>
   </div>
 </template>
 
@@ -378,13 +174,17 @@ const statusData = ref([
     value: "0",
   },
   {
-    label: "进行中",
+    label: "生产中",
     value: "1",
   },
   {
-    label: "完成",
+    label: "生产完成",
     value: "2",
   },
+  {
+    label: "已出库",
+    value: "10",
+  },
 ]);
 
 const isOverdueData = ref([
@@ -400,7 +200,7 @@ const isOverdueData = ref([
 
 const selectConfig = computed(() => [
   // {
-  //   label: "生产公司",
+  //   label: "工厂",
   //   prop: "companyId",
   //   data: companyData.value,
   // },
@@ -475,7 +275,7 @@ const config = ref([
   // },
   {
     attrs: {
-      label: "生产公司",
+      label: "工厂",
       prop: "companyName",
       width: 100,
       // align: "center",
@@ -586,16 +386,22 @@ const config = ref([
     attrs: {
       label: "交期",
       prop: "deliveryPeriod",
-      width: 160,
+      width: 100,
     },
-  },
-  {
-    attrs: {
-      label: "投产时间",
-      prop: "produceTime",
-      width: 160,
+    render(val) {
+      if (val) {
+        return val.slice(0, 10);
+      }
+      return "";
     },
   },
+  // {
+  //   attrs: {
+  //     label: "投产时间",
+  //     prop: "produceTime",
+  //     width: 160,
+  //   },
+  // },
   {
     attrs: {
       label: "完成时间",
@@ -632,17 +438,29 @@ const formDom = ref(null);
 const formConfig = computed(() => {
   return [
     {
-      type: "input",
-      prop: "remark",
-      itemType: "textarea",
-      label: "备注",
+      type: "date",
+      prop: "schedulingDate",
+      itemType: "date",
+      label: "排程日期",
       itemWidth: 100,
       disabled: false,
     },
+    {
+      type: "number",
+      prop: "quantity",
+      label: "数量",
+      precision: 0,
+      min: 0,
+      controls: false,
+      itemWidth: 100,
+    },
   ];
 });
 const rules = ref({
-  remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
+  schedulingDate: [
+    { required: true, message: "请选择排程日期", trigger: "change" },
+  ],
+  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
 });
 
 const getList = async (req) => {
@@ -719,58 +537,26 @@ const getList = async (req) => {
     });
 };
 
-const printList = ref([]);
-
-const selectIds = ref([]);
-const selectRow = (data) => {
-  selectIds.value = data.map((x) => x.id);
-};
-const printTime = ref("");
-const openModal = () => {
-  proxy.msgTip("请稍后", 2);
-  proxy
-    .post("/produceOrderDetail/detailByIds", { taskIds: selectIds.value })
-    .then((res) => {
-      printList.value = res;
-      for (let i = 0; i < printList.value.length; i++) {
-        const iele = printList.value[i];
-        for (let j = 0; j < sourceList.value.data.length; j++) {
-          const jele = sourceList.value.data[j];
-          if (iele.id == jele.id) {
-            iele.fileList = jele.fileList;
-            iele.fileListOne = jele.fileListOne;
-            break;
-          }
-        }
-      }
-      printTime.value = moment().format("yyyy-MM-DD HH:mm:ss");
-      dialogVisible.value = true;
-      nextTick(() => {
-        for (let i = 0; i < printList.value.length; i++) {
-          const row = printList.value[i];
-          proxy.$refs[row.id][0].innerHTML = ""; //清除二维码方法一
-          new QRCode(proxy.$refs[row.id][0], {
-            text: row.id,
-            width: 200,
-            height: 200,
-            colorDark: "#000000",
-            colorLight: "#ffffff",
-            correctLevel: QRCode.CorrectLevel.H,
-          });
-        }
-      });
-    });
+const openModal = (item, sonItem) => {
+  formData.data = {
+    taskId: item.id,
+    processesId: sonItem.id,
+    schedulingDate: "",
+    quantity: null,
+  };
+  dialogVisible.value = true;
 };
 
 const submitForm = () => {
   formDom.value.handleSubmit((valid) => {
     submitLoading.value = true;
-    proxy.post("/produceOrderDetail/editRemark", formData.data).then(
+    proxy.post("/productionScheduling/add", formData.data).then(
       (res) => {
         proxy.msgTip("操作成功", 1);
-        remarkDialog.value = false;
+        dialogVisible.value = false;
         submitLoading.value = false;
         getList();
+        getRightData();
       },
       (err) => {
         submitLoading.value = false;
@@ -797,7 +583,7 @@ const getProcesses = () => {
           label: `[ ${ele.name} ]`,
           slot: ele.id,
           isNeedHeaderSlot: false,
-          width: 90,
+          width: 100,
           align: "center",
           fixed: "right",
         };
@@ -845,26 +631,6 @@ const getProcesses = () => {
 };
 getProcesses();
 getList();
-const printType = ref(false);
-
-const printQrCode = (row) => {
-  printType.value = true;
-  selectIds.value = [row.id];
-  openModal();
-};
-const beforeClose = () => {
-  if (printType.value) {
-    selectIds.value = [];
-  }
-  dialogVisible.value = false;
-};
-const printObj = ref({
-  id: "pdfDom",
-  popTitle: "",
-  extraCss:
-    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
-  extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
-});
 
 const handleClickFile = (file) => {
   window.open(file.fileUrl, "_blank");
@@ -879,6 +645,26 @@ const isShowCotent = (slot, item) => {
     return false;
   }
 };
+
+const isFindCotentData = (slot, item) => {
+  if (item && item.productionTaskProgressList) {
+    let current = item.productionTaskProgressList.find(
+      (x) => x.processesId == slot.id
+    );
+    if (
+      current &&
+      current.schedulingList &&
+      current.schedulingList.length > 0
+    ) {
+      return current;
+    } else {
+      return {
+        schedulingList: [],
+        schedulingCount: 0,
+      };
+    }
+  }
+};
 const showCotent = (slot, item) => {
   if (item && item.productionTaskProgressList) {
     const current = item.productionTaskProgressList.find(
@@ -971,7 +757,7 @@ const month = ref(moment().format("yyyy年MM月"));
 const monthOne = ref(moment().format("yyyy-MM"));
 
 const calendar = ref(null);
-const rightData = ref([]);
+const rightData = ref({});
 const rightDataObj = ref({});
 const colorData = ref({});
 let colorList = [
@@ -989,37 +775,32 @@ let colorList = [
   "#FFB3FF",
   "#FFFF33",
 ];
-const getRightData = () => {
-  proxy
-    .post("/produceOrder/schedulingList", {
-      beginDate: monthOne.value,
-      companyId: sourceList.value.pagination.companyId,
-    })
-    .then(
-      (res) => {
-        rightDataObj.value = {};
-        rightData.value = res.map((x, index) => ({
-          ...x,
-          produceTimeOne: x.produceTime,
-          produceTime: x.produceTime.substr(0, 10),
-          deliveryPeriod: x.deliveryPeriod.substr(0, 10),
-        }));
 
-        for (let i = 0; i < res.length; i++) {
-          const ele = res[i];
-          rightDataObj.value[ele.id] = ele;
-          if (i <= 12) {
-            colorData.value[ele.id] = colorList[i];
-          } else {
-            let index = Math.floor(i % 12);
-            colorData.value[ele.id] = colorList[index];
-          }
-        }
-      },
-      (err) => {
-        loading.value = false;
-      }
-    );
+function getLastDayOfMonth() {
+  // 设置指定的月份
+  let date = new Date(monthOne.value + "-01");
+  // 将日期设置为下个月的第一天
+  date.setMonth(date.getMonth() + 1);
+  // 将日期设置为上个月的最后一天
+  date.setDate(date.getDate() - 1);
+  // 返回月份的最后一天
+  return date.getDate();
+}
+
+const getRightData = () => {
+  if (monthOne.value.includes("-")) {
+    proxy
+      .post("/productionScheduling/listMap", {
+        beginTime: monthOne.value + "-01",
+        endTime: monthOne.value + "-" + getLastDayOfMonth(),
+      })
+      .then(
+        (res) => {
+          rightData.value = res;
+        },
+        (err) => {}
+      );
+  }
 };
 getRightData();
 
@@ -1030,51 +811,9 @@ const clickToday = () => {
   getRightData();
 };
 
-const isShow = (day) => {
-  let nowDay = new Date(day + " 23:59:59").getTime();
-  let flag = false;
-  for (let i = 0; i < rightData.value.length; i++) {
-    const e = rightData.value[i];
-    let startDay = new Date(e.produceTime).getTime();
-    let endDay = new Date(e.deliveryPeriod + " 23:59:59").getTime();
-    if (nowDay >= startDay && nowDay <= endDay) {
-      flag = true;
-      break;
-    }
-  }
-  return flag;
-};
-
-const judgeDay = (day) => {
-  // return dateList.value[day] && dateList.value[day].length > 0;
-  let nowDay = new Date(day + " 23:59:59").getTime();
-  let rows = [];
-  for (let i = 0; i < rightData.value.length; i++) {
-    const e = rightData.value[i];
-    let startDay = new Date(e.produceTime).getTime();
-    let endDay = new Date(e.deliveryPeriod + " 23:59:59").getTime();
-    if (nowDay >= startDay && nowDay <= endDay) {
-      rows.push(e.id);
-    }
-  }
-  return rows;
-};
-
-const showData = ref([]);
-const onShow = (day) => {
-  let rows = judgeDay(day);
-  showData.value = rows;
-};
-
-const getData = (id, att) => {
-  const current = rightData.value.find((x) => x.id == id);
-  if (current && current[att]) {
-    return current[att];
-  }
-};
-
 const selectDate = (val) => {
   calendar.value.selectDate(val);
+  getRightData();
 };
 
 const prevMonth = () => {
@@ -1083,15 +822,14 @@ const prevMonth = () => {
   ).format("yyyy年MM月");
   monthOne.value = moment(moment(month.value, "yyyy年MM月")).format("yyyy-MM");
   selectDate("prev-month");
-  getRightData();
 };
+
 const nextMonth = () => {
   month.value = moment(
     moment(month.value, "yyyy年MM月").add(+1, "month").calendar()
   ).format("yyyy年MM月");
   monthOne.value = moment(moment(month.value, "yyyy年MM月")).format("yyyy-MM");
   selectDate("next-month");
-  getRightData();
 };
 
 watch(
@@ -1106,6 +844,19 @@ watch(
     }
   }
 );
+
+const isShowDayData = (day, process) => {
+  if (rightData.value[day] && rightData.value[day].length > 0) {
+    let current = rightData.value[day].find((x) => x.processesId == process.id);
+    if (current) {
+      return current;
+    } else {
+      return false;
+    }
+  } else {
+    return false;
+  }
+};
 </script>
 
 <style lang="scss" scoped>
@@ -1205,5 +956,6 @@ watch(
   // min-height: calc((100vh - 100px - 20px - 83px - 80px) / 5);
   height: auto;
   overflow-y: hidden;
+  padding: 4px;
 }
 </style>

+ 7 - 7
src/views/MES/productionMaterial/index.vue

@@ -209,13 +209,13 @@ const configOne = ref([
       width: 110,
     },
   },
-  {
-    attrs: {
-      label: "投产时间",
-      prop: "productionTime",
-      width: 160,
-    },
-  },
+  // {
+  //   attrs: {
+  //     label: "投产时间",
+  //     prop: "productionTime",
+  //     width: 160,
+  //   },
+  // },
 ]);
 const formData = reactive({
   data: {

+ 57 - 40
src/views/MES/productionOrder/index.vue

@@ -143,8 +143,7 @@
       </byForm>
       <template #footer>
         <el-button @click="confirmDialog =false" size="default" v-debounce>取 消</el-button>
-        <el-button @click="submitConfirm('2')" type="danger" size="default" v-debounce>驳 回</el-button>
-        <el-button @click="submitConfirm('1')" type="primary" size="default" v-debounce>提 交</el-button>
+        <el-button @click="submitConfirm()" type="primary" size="default" v-debounce>提 交</el-button>
       </template>
     </el-dialog>
 
@@ -291,11 +290,11 @@ const statusData = ref([
     value: "0",
   },
   {
-    label: "进行中",
+    label: "生产中",
     value: "1",
   },
   {
-    label: "完成",
+    label: "生产完成",
     value: "2",
   },
   {
@@ -317,7 +316,7 @@ const isOverdueData = ref([
 
 const selectConfig = computed(() => [
   // {
-  //   label: "生产公司",
+  //   label: "工厂",
   //   prop: "companyId",
   //   data: companyData.value,
   //   fn: () => {
@@ -355,7 +354,7 @@ const config = computed(() => {
   return [
     {
       attrs: {
-        label: "生产公司",
+        label: "工厂",
         prop: "companyName",
         width: 130,
       },
@@ -388,16 +387,22 @@ const config = computed(() => {
       attrs: {
         label: "交期",
         prop: "deliveryPeriod",
-        width: 160,
+        width: 100,
       },
-    },
-    {
-      attrs: {
-        label: "投产时间",
-        prop: "produceTime",
-        width: 160,
+      render(val) {
+        if (val) {
+          return val.slice(0, 10);
+        }
+        return "";
       },
     },
+    // {
+    //   attrs: {
+    //     label: "投产时间",
+    //     prop: "produceTime",
+    //     width: 160,
+    //   },
+    // },
     {
       attrs: {
         label: "完工时间",
@@ -436,19 +441,21 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          row.confirmStatus == "1" && proxy.isCurrentCompanyData(row.companyId)
-            ? {
-                attrs: {
-                  label: "投产",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  clickDistributeProduction(row);
-                },
-              }
-            : {},
+          // row.confirmStatus == "1" &&
+          // !row.produceTime &&
+          // proxy.isCurrentCompanyData(row.companyId)
+          //   ? {
+          //       attrs: {
+          //         label: "投产",
+          //         type: "primary",
+          //         text: true,
+          //       },
+          //       el: "button",
+          //       click() {
+          //         clickDistributeProduction(row);
+          //       },
+          //     }
+          //   : {},
           row.confirmStatus == "0" && proxy.isCurrentCompanyData(row.companyId)
             ? {
                 attrs: {
@@ -929,37 +936,47 @@ const confirmFormOption = reactive({
 });
 const confirmFormConfig = computed(() => [
   {
+    type: "select",
+    // itemType: "textarea",
+    label: "交期确认",
+    prop: "confirmStatus",
+    itemWidth: 100,
+    data: [
+      {
+        label: "确认",
+        value: "1",
+      },
+      {
+        label: "驳回",
+        value: "2",
+      },
+    ],
+  },
+  {
     type: "input",
     itemType: "textarea",
-    label: "退回原因",
+    label: "备注",
     prop: "rejectRemark",
-    // placeholder: "合同开始时间",
     itemWidth: 100,
-    // clearable: true,
-    // disabledFn: (date) => {
-    //   return moment(date).isBefore(moment());
-    // },
   },
 ]);
-const confirmRules = ref({});
+const confirmRules = ref({
+  confirmStatus: [
+    { required: true, message: "请选择提交类型", trigger: "change" },
+  ],
+  rejectRemark: [{ required: true, message: "请输入备注", trigger: "blur" }],
+});
 const confirmDeliveryTime = (row) => {
   formData.dataOne = {
     id: row.id,
     rejectRemark: "",
     confirmStatus: "",
   };
-
   confirmDialog.value = true;
 };
 
 const submitConfirm = (type) => {
   confirmFormDom.value.handleSubmit(() => {
-    formData.dataOne.confirmStatus = type;
-    if (type == "2") {
-      if (!formData.dataOne.rejectRemark) {
-        return proxy.msgTip("请填写退回原因", 2);
-      }
-    }
     formLoading.value = true;
     proxy
       .post("/produceOrder/deliveryConfirm", formData.dataOne)

+ 6 - 18
src/views/MES/productionScheduling/index.vue

@@ -29,11 +29,12 @@
 
         <template #date="{ item }">
           <div style="width:100%; ">
-            <div><el-icon :size="16" style="cursor:pointer;margin-right: 3px;position:relative;top:4px" color="#409EFF"
+            <div>
+              <!-- <el-icon :size="16" style="cursor:pointer;margin-right: 3px;position:relative;top:4px" color="#409EFF"
                        @click="clickDistributeProduction(item)" v-if="isCurrentCompanyData(item.companyId)">
                 <Clock />
               </el-icon>
-              <span style="padding:0 8px" v-else></span>
+              <span style="padding:0 8px" v-else></span> -->
               {{item.produceTime}} ~ {{item.deliveryPeriod}}
             </div>
           </div>
@@ -129,20 +130,7 @@ const sourceList = ref({
 const treeData = ref([]);
 const dialogVisible = ref(false);
 const modalType = ref("add");
-const statusData = ref([
-  {
-    label: "未开始",
-    value: "0",
-  },
-  {
-    label: "进行中",
-    value: "1",
-  },
-  {
-    label: "已完成",
-    value: "2",
-  },
-]);
+
 const allDay = ref([]);
 const changDay = (val) => {
   getList();
@@ -183,7 +171,7 @@ const isOverdueData = ref([
 
 const selectConfig = computed(() => [
   {
-    label: "生产公司",
+    label: "工厂",
     prop: "companyId",
     data: companyData.value,
   },
@@ -210,7 +198,7 @@ const selectConfig = computed(() => [
 const config = ref([
   {
     attrs: {
-      label: "生产公司",
+      label: "工厂",
       prop: "companyName",
       width: 100,
       align: "center",

+ 21 - 11
src/views/MES/productionTask/index.vue

@@ -354,13 +354,17 @@ const statusData = ref([
     value: "0",
   },
   {
-    label: "进行中",
+    label: "生产中",
     value: "1",
   },
   {
-    label: "完成",
+    label: "生产完成",
     value: "2",
   },
+  {
+    label: "已出库",
+    value: "10",
+  },
 ]);
 
 const isOverdueData = ref([
@@ -376,7 +380,7 @@ const isOverdueData = ref([
 
 const selectConfig = computed(() => [
   {
-    label: "生产公司",
+    label: "工厂",
     prop: "companyId",
     data: companyData.value,
   },
@@ -451,7 +455,7 @@ const config = ref([
   },
   {
     attrs: {
-      label: "生产公司",
+      label: "工厂",
       prop: "companyName",
       width: 100,
       // align: "center",
@@ -570,16 +574,22 @@ const config = ref([
     attrs: {
       label: "交期",
       prop: "deliveryPeriod",
-      width: 160,
+      width: 100,
     },
-  },
-  {
-    attrs: {
-      label: "投产时间",
-      prop: "produceTime",
-      width: 160,
+    render(val) {
+      if (val) {
+        return val.slice(0, 10);
+      }
+      return "";
     },
   },
+  // {
+  //   attrs: {
+  //     label: "投产时间",
+  //     prop: "produceTime",
+  //     width: 160,
+  //   },
+  // },
   {
     attrs: {
       label: "完成时间",

+ 6 - 2
src/views/MES/productionWorkOrder/index.vue

@@ -90,13 +90,17 @@ const statusData = ref([
     value: "0",
   },
   {
-    label: "进行中",
+    label: "生产中",
     value: "1",
   },
   {
-    label: "完成",
+    label: "生产完成",
     value: "2",
   },
+  {
+    label: "已出库",
+    value: "10",
+  },
 ]);
 const selectConfig = computed(() => [
   {

+ 0 - 14
src/views/MES/reportDetail/index.vue

@@ -64,20 +64,6 @@ const sourceList = ref({
 const treeData = ref([]);
 const dialogVisible = ref(false);
 const modalType = ref("add");
-const statusData = ref([
-  {
-    label: "未开始",
-    value: "0",
-  },
-  {
-    label: "进行中",
-    value: "1",
-  },
-  {
-    label: "已完成",
-    value: "2",
-  },
-]);
 const selectConfig = computed(() => [
   {
     label: "工序",

+ 1 - 1
src/views/process/processApproval/index.vue

@@ -489,7 +489,7 @@ onMounted(async () => {
         myChart.setOption(optionTwo.data);
         myChart.resize();
       } else {
-        return;
+        showChart.value = false;
       }
     });
   });

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

@@ -181,7 +181,7 @@ const config = computed(() => {
   return [
     {
       attrs: {
-        label: "生产公司",
+        label: "工厂",
         prop: "corporationName",
         width: 110,
       },

+ 2 - 2
src/views/salesMange/saleContract/contract/index.vue

@@ -168,7 +168,7 @@ const selectConfig = computed(() => {
       data: refundStatusNew.value,
     },
     {
-      label: "合同类型",
+      label: "订单类型",
       prop: "contractType",
       data: contractType.value,
     },
@@ -188,7 +188,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "合同类型",
+        label: "订单类型",
         prop: "contractType",
         width: 100,
       },

+ 1 - 1
src/views/salesMange/saleContract/contractSelect/index.vue

@@ -113,7 +113,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "合同类型",
+        label: "订单类型",
         prop: "contractType",
         width: 120,
       },

+ 72 - 11
src/views/systemTenant/tenant/userTenant/index.vue

@@ -41,8 +41,8 @@
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #deptId>
           <div style="width: 100%">
-            <el-tree-select v-model="formData.data.deptId" :data="deptList.data" check-strictly :render-after-expand="false" node-key="deptId"
-                            :props="defaultProps" style="width:100%" />
+            <el-tree-select v-model="formData.data.deptId" :data="deptList" check-strictly :render-after-expand="false" node-key="deptId"
+                            :props="defaultProps" style="width:100%" :disabled="modalType=='edit'" @change="handleDeptIdChange" />
           </div>
         </template>
         <template #account>
@@ -182,13 +182,6 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              if (!sourceList.value.pagination.tenantId) {
-                ElMessage({
-                  message: "请选择租户",
-                  type: "warning",
-                });
-                return;
-              }
               getDtl(row);
             },
           },
@@ -332,8 +325,9 @@ const formConfig = computed(() => {
     {
       type: "select",
       label: "关联公司",
-      prop: "sa",
+      prop: "companySet",
       multiple: true,
+      clearable: false,
       data: companyData.value,
     },
   ];
@@ -344,6 +338,9 @@ const rules = ref({
   userName: [{ required: true, message: "请输入用户名", trigger: "blur" }],
   roleIds: [{ required: true, message: "请选择角色", trigger: "change" }],
   phonenumber: [{ required: true, message: "请输入手机号", trigger: "blur" }],
+  companySet: [
+    { required: true, message: "请选择关联公司", trigger: "change" },
+  ],
 });
 const getUserList = () => {
   proxy
@@ -382,16 +379,66 @@ const openModal = () => {
   formData.data = {
     userType: 1,
     tenantId: proxy.useUserStore().user.tenantId,
+    companySet: [],
   };
   loadingDialog.value = false;
   dialogVisible.value = true;
 };
+function findNodeById(treeData, nodeId) {
+  // 遍历当前层级的所有节点
+  for (let i = 0; i < treeData.length; i++) {
+    let node = treeData[i];
+    // 如果当前节点的 ID 匹配目标节点的 ID,则返回当前节点
+    if (node.deptId === nodeId) {
+      return node;
+    }
+    // 如果当前节点有子节点,则递归调用当前函数继续查找子节点
+    if (node.children && node.children.length > 0) {
+      let foundNode = findNodeById(node.children, nodeId);
+      // 如果在子节点中找到了目标节点,则返回找到的节点
+      if (foundNode) {
+        return foundNode;
+      }
+    }
+  }
+  // 如果遍历完所有节点仍未找到目标节点,则返回 null
+  return null;
+}
+
+const findCompanyType = (val) => {
+  const current = findNodeById(deptList.value, val);
+  if (current && current.type == 0) {
+    formData.data.companySet = [val];
+    companyData.value = companyData.value.map((x) => ({
+      ...x,
+      disabled: val == x.value,
+    }));
+  } else {
+    return findCompanyType(current.parentId);
+  }
+};
+
+const handleDeptIdChange = (val) => {
+  const current = findNodeById(deptList.value, val);
+  if (current && current.type == 0) {
+    formData.data.companySet = [val];
+    companyData.value = companyData.value.map((x) => ({
+      ...x,
+      disabled: val == x.value,
+    }));
+  } else {
+    findCompanyType(current.parentId);
+  }
+};
 const submitForm = () => {
   submit.value.handleSubmit(() => {
     if (formData.data.password && formData.data.password.length < 5) {
       return ElMessage("密码长度不得低于五位");
     }
     const method = modalType.value == "add" ? "POST" : "PUT";
+    if (formData.data.companySet && formData.data.companySet.length > 0) {
+      formData.data.companySet = formData.data.companySet.join(",");
+    }
     proxy.post("/tenantUser", formData.data, method).then(() => {
       if (formData.data.password && formData.data.userId) {
         proxy
@@ -412,9 +459,23 @@ const submitForm = () => {
   });
 };
 const getDtl = (row) => {
+  companyData.value = companyData.value.map((x) => ({
+    ...x,
+    disabled: row.companyId == x.value,
+  }));
   dialogVisible.value = true;
   proxy.get(`/tenantUser/${row.userId}`).then((res) => {
     formData.data = { ...row, userType: 1, roleIds: res.roleIds };
+    let companySetData = formData.data.companySet
+      ? formData.data.companySet
+      : "";
+    if (companySetData) {
+      formData.data.companySet = [
+        ...new Set((row.companyId + "," + companySetData).split(",")),
+      ];
+    } else {
+      formData.data.companySet = row.companyId.split(",");
+    }
     modalType.value = "edit";
   });
 };
@@ -491,7 +552,7 @@ const getTreeData = () => {
       //   },
       // ];
       treeData.value = proxy.handleTree(res.data, "deptId");
-      deptList.value.data = proxy.handleTree(res.data, "deptId");
+      deptList.value = proxy.handleTree(res.data, "deptId");
     });
 };
 getTreeData();

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff