Bladeren bron

部分需求更改

cz 1 jaar geleden
bovenliggende
commit
a725fe8a1c

+ 27 - 28
src/components/process/SF/Contract.vue

@@ -868,7 +868,7 @@ const formConfig = computed(() => {
     {
       type: "select",
       prop: "shroffAccountId",
-      label: "款账号",
+      label: "款账号",
       data: accountList.value,
       itemWidth: 50,
       fn: (val) => {
@@ -1447,35 +1447,31 @@ const changeCustomer = (val) => {
   }
 };
 const changeAdvanceRatio = (val, flag) => {
-  if (val && flag) {
-    if (formData.data.beforeShipmentRatio > 0) {
-      let total = Number(
-        parseFloat(val + formData.data.beforeShipmentRatio).toFixed(2)
+  if (flag) {
+    let total = Number(
+      parseFloat(val + Number(formData.data.beforeShipmentRatio)).toFixed(2)
+    );
+    if (total > 100) {
+      formData.data.advanceRatio = null;
+      formData.data.beforeShipmentRatio = null;
+      formData.data.afterShipmentRatio = null;
+    } else {
+      formData.data.afterShipmentRatio = Number(
+        parseFloat(100 - total).toFixed(2)
       );
-      if (total > 100) {
-        formData.data.advanceRatio = null;
-        formData.data.beforeShipmentRatio = null;
-        formData.data.afterShipmentRatio = null;
-      } else {
-        formData.data.afterShipmentRatio = Number(
-          parseFloat(100 - total).toFixed(2)
-        );
-      }
     }
-  } else if (val && !flag) {
-    if (formData.data.advanceRatio > 0) {
-      let total = Number(
-        parseFloat(val + formData.data.advanceRatio).toFixed(2)
+  } else {
+    let total = Number(
+      parseFloat(val + Number(formData.data.advanceRatio)).toFixed(2)
+    );
+    if (total > 100) {
+      formData.data.advanceRatio = null;
+      formData.data.beforeShipmentRatio = null;
+      formData.data.afterShipmentRatio = null;
+    } else {
+      formData.data.afterShipmentRatio = Number(
+        parseFloat(100 - total).toFixed(2)
       );
-      if (total > 100) {
-        formData.data.advanceRatio = null;
-        formData.data.beforeShipmentRatio = null;
-        formData.data.afterShipmentRatio = null;
-      } else {
-        formData.data.afterShipmentRatio = Number(
-          parseFloat(100 - total).toFixed(2)
-        );
-      }
     }
   }
 };
@@ -1865,7 +1861,10 @@ const remoteMethod = (keyword) => {
   return;
 };
 
-const handleSubmit = async () => {
+const handleSubmit = async (isStag = false) => {
+  if (isStag) {
+    return true;
+  }
   let flag = await formDom.value.handleSubmit(() => {});
   if (flag) {
     if (

+ 51 - 20
src/components/process/SF/Purchase.vue

@@ -234,16 +234,16 @@
             <el-table-column label="单价(含税)" width="120">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'purchaseProductList.' + $index + '.taxPrice'" :rules="rules.taxPrice" :inline-message="true"
+                  <el-form-item :prop="'purchaseProductList.' + $index + '.priceIncludingTax'" :rules="rules.priceIncludingTax" :inline-message="true"
                                 class="margin-b-0 wid100">
-                    <el-input-number onmousewheel="return false;" v-model="row.taxPrice" placeholder="请输入" style="width: 100%" :precision="2"
+                    <el-input-number onmousewheel="return false;" v-model="row.priceIncludingTax" placeholder="请输入" style="width: 100%" :precision="2"
                                      :controls="false" :min="0" @change="calculationAmount()" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
             <el-table-column label="⼩计(不含税)" width="130" prop="amount" />
-            <el-table-column label="⼩计(含税)" width="120" prop="taxAmount" />
+            <el-table-column label="⼩计(含税)" width="120" prop="amountIncludingTax" />
             <el-table-column label="备注" width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -376,6 +376,7 @@ const copyType = ref(1);
 const copyContract = ref(false);
 const formData = reactive({
   data: {
+    fileList: [],
     purchaseProductList: [],
     remark: "",
   },
@@ -431,6 +432,8 @@ const formConfig = computed(() => {
       itemWidth: 25,
       // disabled: true,
       fn: (val) => {
+        formData.data.deptId = "";
+        formData.data.purchaseUserId = "";
         getDeptData(val);
       },
     },
@@ -445,7 +448,7 @@ const formConfig = computed(() => {
     },
     {
       type: "select",
-      prop: "devUserId",
+      prop: "purchaseUserId",
       label: "采购员",
       required: true,
       filterable: true,
@@ -462,7 +465,7 @@ const formConfig = computed(() => {
     },
     {
       type: "treeSelect",
-      prop: "companyIdaa",
+      prop: "prodCompanyId",
       label: "生产单位",
       data: treeData.value,
       propsTreeLabel: "deptName",
@@ -471,7 +474,7 @@ const formConfig = computed(() => {
     },
     {
       type: "select",
-      prop: "ss",
+      prop: "warehouseId",
       label: "入库仓库",
       data: warehouseList.value,
       itemWidth: 25,
@@ -555,7 +558,7 @@ const formConfig = computed(() => {
     },
     {
       type: "select",
-      prop: "ea",
+      prop: "supplierIncludingTax",
       label: "报价是否含税",
       filterable: true,
       placeholder: " ",
@@ -574,13 +577,21 @@ const formConfig = computed(() => {
     },
     {
       type: "input",
-      prop: "privTaxPoints",
+      prop: "supplierTaxPoints",
       label: "供应商税点",
       itemType: "text",
       itemWidth: 33.33,
       disabled: true,
       placeholder: " ",
     },
+    {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "fileList",
+      label: "附件",
+      itemWidth: 100,
+    },
     // {
     //   type: "number",
     //   prop: "warranty",
@@ -637,7 +648,7 @@ const formConfig = computed(() => {
     },
     {
       type: "input",
-      prop: "taxAmount",
+      prop: "amountIncludingTax",
       label: "总金额(含税)",
       itemWidth: 25,
       disabled: true,
@@ -712,6 +723,19 @@ const rules = ref({
   amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
   remark: [{ required: true, message: "请输入条款内容", trigger: "blur" }],
   companyId: [{ required: true, message: "请选择业务公司", trigger: "change" }],
+  deptId: [{ required: true, message: "请选择业务部门", trigger: "change" }],
+  purchaseUserId: [
+    { required: true, message: "请选择采购员", trigger: "change" },
+  ],
+  subcribeTime: [
+    { required: true, message: "请选择采购日期", trigger: "change" },
+  ],
+  prodCompanyId: [
+    { required: true, message: "请选择生产单位", trigger: "change" },
+  ],
+  warehouseId: [
+    { required: true, message: "请选择入库仓库", trigger: "change" },
+  ],
 });
 const getDict = () => {
   proxy
@@ -973,8 +997,8 @@ const changeSupplier = (val) => {
         getCityData(formData.data.provinceId, "30");
       }
       setTimeout(() => changeAddress(), 1500);
-      formData.data.ea = res.privIncludingTax;
-      formData.data.privTaxPoints = res.privTaxPoints;
+      formData.data.supplierIncludingTax = res.privIncludingTax;
+      formData.data.supplierTaxPoints = res.privTaxPoints;
     });
   }
 };
@@ -1046,9 +1070,9 @@ const calculationAmount = () => {
         Number(formData.data.purchaseProductList[i].quantity) *
           Number(formData.data.purchaseProductList[i].price)
       ).toFixed(2);
-      formData.data.purchaseProductList[i].taxAmount = parseFloat(
+      formData.data.purchaseProductList[i].amountIncludingTax = parseFloat(
         Number(formData.data.purchaseProductList[i].quantity) *
-          Number(formData.data.purchaseProductList[i].taxPrice)
+          Number(formData.data.purchaseProductList[i].priceIncludingTax)
       ).toFixed(2);
     }
   }
@@ -1069,10 +1093,10 @@ const totalAmount = () => {
           Number(money) + Number(formData.data.purchaseProductList[i].amount)
         ).toFixed(2);
       }
-      if (formData.data.purchaseProductList[i].taxAmount) {
+      if (formData.data.purchaseProductList[i].amountIncludingTax) {
         moneyTwo = parseFloat(
           Number(moneyTwo) +
-            Number(formData.data.purchaseProductList[i].taxAmount)
+            Number(formData.data.purchaseProductList[i].amountIncludingTax)
         ).toFixed(2);
       }
     }
@@ -1090,8 +1114,9 @@ const totalAmount = () => {
     }
   }
   formData.data.amount = money;
-  formData.data.taxAmount = moneyTwo;
+  formData.data.amountIncludingTax = moneyTwo;
 };
+
 const clickAdd = () => {
   if (
     formData.data.purchaseProjectList &&
@@ -1245,11 +1270,17 @@ const getProductList = (ids) => {
             productLength: item.productLength,
             productWidth: item.productWidth,
             productHeight: item.productHeight,
+            productColor: item.productColor,
+            productNetWeight: item.productNetWeight,
+            productFrontalTexture: item.productFrontalTexture,
+            productUnit: item.productUnit,
             subscribeCount: item.count || 0,
             purchaseCount: item.purchaseCount || 0,
-            quantity: null,
-            price: null,
-            amount: "",
+            quantity: Number(item.count) - Number(item.purchaseCount) || null,
+            price: item.price || null,
+            priceIncludingTax: item.priceIncludingTax || null,
+            amount: item.amount || "",
+            amountIncludingTax: item.amountIncludingTax || "",
             remark: "",
             fileUrl: "",
             dataResource: item.dataType,
@@ -1281,7 +1312,7 @@ const getProductList = (ids) => {
               }
             }
           });
-
+        calculationAmount();
         changeProductPrice();
       }
     });

+ 11 - 4
src/components/process/SF/Subscribe.vue

@@ -155,6 +155,8 @@ const formConfig = computed(() => {
       propsTreeValue: "deptId",
       itemWidth: 25,
       fn: (val) => {
+        formData.data.deptId = "";
+        formData.data.subcribeUserId = "";
         getDeptData(val);
       },
     },
@@ -539,7 +541,10 @@ const handleRemove = (index) => {
   formData.data.subscribeDetailList.splice(index, 1);
 };
 
-const handleSubmit = async () => {
+const handleSubmit = async (isStag = false) => {
+  if (isStag) {
+    return true;
+  }
   let flag = await formDom.value.handleSubmit(() => {});
   if (flag) {
     if (formData.data.isSubstitute == "1") {
@@ -621,12 +626,14 @@ const getAllData = (businessId) => {
     });
   }
 };
+
 onMounted(() => {
   formOption.disabled = judgeStatus();
   formData.data.subcribeTime = proxy.parseTime(new Date());
-  // formData.data.deptName = proxy.useUserStore().user.dept.deptName;
-  // formData.data.deptId = proxy.useUserStore().user.dept.deptId;
-  // formData.data.subcribeName = proxy.useUserStore().user.nickName;
+  formData.data.companyId = proxy.useUserStore().user.companyId;
+  getDeptData(formData.data.companyId);
+  formData.data.deptId = proxy.useUserStore().user.dept.deptId;
+  formData.data.subcribeUserId = proxy.useUserStore().user.userId;
   if (route.query.businessId && route.query.processType) {
     getAllData(route.query.businessId);
   }

+ 470 - 82
src/components/product/SelectMaterial.vue

@@ -1,15 +1,19 @@
 <template>
   <div class="user">
     <div class="tree">
-      <treeList title="物料分类" submitType="2" :hiddenBtn="true" :data="treeListData" v-model="sourceList.pagination.productClassifyId"
-                @change="treeChange" @changeTreeList="getTreeList">
+      <treeList title="物料分类" submitType="2" :data="treeListData" v-model="sourceList.pagination.productClassifyId" @change="treeChange"
+                @changeTreeList="getTreeList">
       </treeList>
     </div>
     <div class="content">
       <byTable :source="sourceList.data" :tableHeight="tableHeight" :pagination="sourceList.pagination" :config="config" :loading="loading"
                highlight-current-row :selectConfig="selectConfig" :action-list="[
-         
-        ]" @get-list="getList">
+              {
+                text: '添加物料',
+                action: () => openModal('add'),
+                disabled: false,
+              },
+        ]" @get-list="getList" v-if="!isShowNoAttributes">
         <template #pic="{ item }">
           <div v-if="item.fileList.length > 0">
             <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
@@ -23,9 +27,50 @@
         </template>
         <template #size="{ item }">
           <div v-if="item['length'] && item.width && item.height">
-            <span>{{ item['length'] }}cm</span>*
-            <span>{{ item.width }}cm</span>*
-            <span>{{ item.height }}cm</span>
+            <span>{{ item['length'] }}</span>*
+            <span>{{ item.width }}</span>*
+            <span>{{ item.height }}</span>
+          </div>
+          <div v-else></div>
+        </template>
+        <template #price="{ item }">
+          <div v-if="item.price">
+            <span>{{ item.currency }} {{ moneyFormat(item.price ,2)}}</span>
+          </div>
+          <div v-else></div>
+        </template>
+        <template #costPrice="{ item }">
+          <div v-if="item.costPrice">
+            <span>{{ item.currency }} {{ moneyFormat(item.costPrice ,2)}}</span>
+          </div>
+          <div v-else></div>
+        </template>
+      </byTable>
+
+      <byTable :source="sourceList.data" :tableHeight="tableHeight" :pagination="sourceList.pagination" :config="configOne" :loading="loading"
+               highlight-current-row :selectConfig="selectConfig" :action-list="[
+              {
+                text: '添加物料',
+                action: () => openModal('add'),
+                disabled: false,
+              },
+        ]" @get-list="getList" v-else>
+        <template #pic="{ item }">
+          <div v-if="item.fileList.length > 0">
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
+          </div>
+          <div v-else></div>
+        </template>
+        <template #name="{ item }">
+          <div>
+            <span class="el-click">{{ item.name }}</span>
+          </div>
+        </template>
+        <template #size="{ item }">
+          <div v-if="item['length'] && item.width && item.height">
+            <span>{{ item['length'] }}</span>*
+            <span>{{ item.width }}</span>*
+            <span>{{ item.height }}</span>
           </div>
           <div v-else></div>
         </template>
@@ -48,38 +93,90 @@
         <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
           <template #size>
             <div style="width: 100%">
-              <el-row>
-                <el-col :span="8">
-                  <el-form-item prop="length" label-width="0px" class="margin-b-0 wid100">
-                    <el-input-number v-model="formData.data.length" placeholder="请输入" style="width: 100%" :precision="2" :controls="false" :min="0"
-                                     onmousewheel="return false;" />
-                  </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                  <el-form-item prop="width" label-width="0px" class="margin-b-0 wid100">
-                    <el-input-number v-model="formData.data.width" placeholder="请输入" style="width: 100%" :precision="2" :controls="false" :min="0"
-                                     onmousewheel="return false;" />
-                  </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                  <el-form-item prop="height" label-width="0px" class="margin-b-0 wid100">
-                    <el-input-number v-model="formData.data.height" placeholder="请输入" style="width: 100%" :precision="2" :controls="false" :min="0"
-                                     onmousewheel="return false;" />
-                  </el-form-item>
-                </el-col>
-              </el-row>
+              <el-form-item label="尺寸" class="margin-b-0 wid100" required>
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item prop="length" label-width="0px" class="margin-b-0 wid100">
+                      <el-input-number v-model="formData.data.length" placeholder="请输入" style="width: 100%" :precision="2" :controls="false" :min="0"
+                                       onmousewheel="return false;" />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item prop="width" label-width="0px" class="margin-b-0 wid100">
+                      <el-input-number v-model="formData.data.width" placeholder="请输入" style="width: 100%" :precision="2" :controls="false" :min="0"
+                                       onmousewheel="return false;" />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item prop="height" label-width="0px" class="margin-b-0 wid100">
+                      <el-input-number v-model="formData.data.height" placeholder="请输入" style="width: 100%" :precision="2" :controls="false" :min="0"
+                                       onmousewheel="return false;" />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form-item>
+
             </div>
           </template>
         </byForm>
       </div>
 
       <template #footer>
-        <el-button @click="dialogVisible = false" size="defualt">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="defualt" :loading="submitLoading">
+        <el-button @click="dialogVisible = false" size="defualt" v-debounce>取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="defualt" :loading="submitLoading" v-debounce>
           确 定
         </el-button>
       </template>
     </el-dialog>
+
+    <el-dialog :title="'关联产品'" v-model="openAssociationProduct" width="70%" destroy-on-close>
+      <div>
+        <!-- class="public_height_dialog" -->
+        <!-- <el-table :data="associationProductData" style="width: 100%;">
+          <el-table-column label="产品图片" width="80">
+            <template #default="{ row }">
+              <div v-if="row.fileUrl">
+                <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="name" label="产品名称" min-width="130" />
+          <el-table-column prop="customCode" label="产品编码" width="180" />
+          <el-table-column label="规格尺寸 (cm)" width="130">
+            <template #default="{ row, $index }">
+              <div style="width: 100%">
+                {{row['length']}} * {{row.width}} * {{row.height}}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="color" label="颜色" width="150" />
+        </el-table> -->
+        <byTable :source="associationData.data" :pagination="associationData.pagination" :config="associationConfig" :loading="loading"
+                 highlight-current-row :selectConfig="[]" :action-list="[]" @get-list="getAssociationList">
+
+          <template #pic="{ item }">
+            <div v-if="item.fileUrl">
+              <img :src="item.fileUrl" class="pic" @click="openImg(item.fileUrl)" />
+            </div>
+            <div v-else></div>
+          </template>
+
+          <template #size="{ item }">
+            <div v-if="item['length'] && item.width && item.height">
+              <span>{{ item['length'] }}</span>*
+              <span>{{ item.width }}</span>*
+              <span>{{ item.height }}</span>
+            </div>
+            <div v-else></div>
+          </template>
+
+        </byTable>
+      </div>
+      <!-- <template #footer>
+        <el-button @click="openAssociationProduct = false" size="defualt" v-debounce>关 闭</el-button>
+      </template> -->
+    </el-dialog>
+
   </div>
 </template>
 
@@ -88,14 +185,6 @@ import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import treeList from "@/components/product/treeList";
 const { proxy } = getCurrentInstance();
-// 接收父组件的传值
-const props = defineProps({
-  // 过滤是否是原料的数据
-  isNeRawMaterial: {
-    type: String,
-    default: "0",
-  },
-});
 const currencyData = computed(
   () => proxy.useUserStore().allDict["account_currency"]
 );
@@ -131,7 +220,6 @@ const sourceList = ref({
     productClassifyId: "",
     keyword: "",
     definition: "2",
-    isNeRawMaterial: props.isNeRawMaterial,
   },
 });
 const dialogVisible = ref(false);
@@ -143,9 +231,14 @@ const rules = ref({
   ],
   name: [{ required: true, message: "请输入物料名称", trigger: "blur" }],
   customCode: [{ required: true, message: "请输入物料编码", trigger: "blur" }],
+  length: [{ required: true, message: "请输入长 (cm)", trigger: "blur" }],
+  width: [{ required: true, message: "请输入宽 (cm)", trigger: "blur" }],
+  height: [{ required: true, message: "请输入高 (cm)", trigger: "blur" }],
+  price: [{ required: true, message: "请输入销售价", trigger: "blur" }],
 });
+
 const selectConfig = computed(() => []);
-const config = computed(() => {
+const configOne = computed(() => {
   return [
     {
       attrs: {
@@ -159,52 +252,125 @@ const config = computed(() => {
       attrs: {
         label: "物料分类",
         prop: "classifyName",
-        "min-width": 150,
+        "min-width": 200,
       },
     },
     {
       attrs: {
         label: "物料编码",
         prop: "customCode",
-        width: 120,
+        width: 190,
       },
     },
     {
       attrs: {
-        label: " 物料名称",
+        label: "物料名称",
         slot: "name",
-        "min-width": 150,
+        "min-width": 300,
       },
     },
     {
       attrs: {
-        label: "物料材质",
-        prop: "material",
-        width: 120,
+        label: "销售价",
+        prop: "price",
+        width: 100,
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
       },
     },
     {
       attrs: {
-        label: "物料型号",
-        prop: "spec",
-        width: 120,
+        label: "操作",
+        width: "180",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "选择",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickSelect(row);
+            },
+          },
+        ];
       },
     },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "图片",
+        slot: "pic",
+        align: "center",
+        width: 80,
+      },
+    },
+    {
+      attrs: {
+        label: "物料分类",
+        prop: "classifyName",
+        "min-width": 200,
+      },
+    },
+    {
+      attrs: {
+        label: "物料编码",
+        prop: "customCode",
+        width: 190,
+      },
+    },
+    {
+      attrs: {
+        label: "物料名称",
+        slot: "name",
+        "min-width": 300,
+      },
+    },
+    {
+      attrs: {
+        label: "安全库存",
+        prop: "stockThreshold",
+        width: 100,
+      },
+    },
+    // {
+    //   attrs: {
+    //     label: "物料材质",
+    //     prop: "material",
+    //     width: 120,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "物料型号",
+    //     prop: "spec",
+    //     width: 120,
+    //   },
+    // },
     {
       attrs: {
         label: "单位",
         prop: "unit",
         width: 80,
       },
-      render(val) {
-        return proxy.dictKeyValue(val, materialUnitData.value);
-      },
+      // render(val) {
+      //   return proxy.dictKeyValue(val, materialUnitData.value);
+      // },
     },
     {
       attrs: {
         label: "尺寸",
         slot: "size",
-        width: 180,
+        width: 130,
       },
     },
     {
@@ -222,16 +388,22 @@ const config = computed(() => {
     {
       attrs: {
         label: "成本价",
-        slot: "costPrice",
+        prop: "costPrice",
         width: 100,
       },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
     },
     {
       attrs: {
         label: "销售价",
-        slot: "price",
+        prop: "price",
         width: 100,
       },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
     },
 
     {
@@ -269,6 +441,27 @@ const formOption = reactive({
 });
 const formDom = ref(null);
 const treeListData = ref([]);
+function findNodeById(treeData, nodeId) {
+  // 遍历当前层级的所有节点
+  for (let i = 0; i < treeData.length; i++) {
+    let node = treeData[i];
+    // 如果当前节点的 ID 匹配目标节点的 ID,则返回当前节点
+    if (node.id === nodeId) {
+      return node;
+    }
+    // 如果当前节点有子节点,则递归调用当前函数继续查找子节点
+    if (node.children && node.children.length > 0) {
+      let foundNode = findNodeById(node.children, nodeId);
+      // 如果在子节点中找到了目标节点,则返回找到的节点
+      if (foundNode) {
+        return foundNode;
+      }
+    }
+  }
+  // 如果遍历完所有节点仍未找到目标节点,则返回 null
+  return null;
+}
+const isShowLabel = ref(false);
 const formConfig = computed(() => {
   return [
     {
@@ -282,6 +475,9 @@ const formConfig = computed(() => {
       data: treeData.value,
       itemWidth: 100,
       disabled: false,
+      fn: (val) => {
+        changeProductClassifyId(val);
+      },
     },
     {
       type: "input",
@@ -298,6 +494,16 @@ const formConfig = computed(() => {
       disabled: false,
     },
     {
+      type: "number",
+      prop: "price",
+      label: "销售价(cm²)",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      isShow: isSpecial.value,
+    },
+    {
       type: "uploadImg",
       // limit: 1,
       // listType: "picture-card",
@@ -305,22 +511,26 @@ const formConfig = computed(() => {
       imgProp: "imageUrl",
       prop: "fileList",
       label: "物料缩略图",
+      // isShow: !isSpecial.value,
     },
     {
       type: "title1",
       title: "材质特征",
+      isShow: !isSpecial.value,
     },
     {
       type: "input",
       prop: "material",
       label: "材质",
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
       type: "input",
       prop: "spec",
       label: "型号",
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
       type: "select",
@@ -328,6 +538,7 @@ const formConfig = computed(() => {
       label: "正面纹路",
       data: frontLinesData.value,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
       type: "select",
@@ -335,20 +546,30 @@ const formConfig = computed(() => {
       label: "背面纹路",
       data: backLinesData.value,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
-      type: "select",
+      type: "input",
       prop: "unit",
       label: "单位",
-      data: materialUnitData.value,
+      // data: materialUnitData.value,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
+    // {
+    //   type: "select",
+    //   prop: "unit",
+    //   label: "单位",
+    //   data: materialUnitData.value,
+    //   itemWidth: 50,
+    // },
     {
       type: "select",
       prop: "colorLayer",
       label: "色层",
       data: colorLayerData.value,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     // {
     //   type: "input",
@@ -359,47 +580,71 @@ const formConfig = computed(() => {
     {
       type: "title1",
       title: "规格",
+      isShow: !isSpecial.value,
     },
     {
       type: "input",
       prop: "color",
       label: "颜色",
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
       type: "number",
       prop: "stockThreshold",
       label: "安全库存",
-      precision: 2,
+      precision: 0,
       min: 0,
       controls: false,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
     {
-      type: "selectInput",
+      type: "number",
       prop: "costPrice",
-      selectProp: "costCurrency",
-      label: "成本价",
+      label: "成本价" + (isShowLabel.value ? "(cm²)" : ""),
+      precision: 2,
+      min: 0.01,
+      controls: false,
       itemWidth: 50,
-      disabledSelect: true,
-      data: currencyData.value,
+      isShow: !isSpecial.value,
     },
+    // {
+    //   type: "selectInput",
+    //   prop: "costPrice",
+    //   selectProp: "costCurrency",
+    //   label: "成本价",
+    //   itemWidth: 50,
+    //   disabledSelect: true,
+    //   data: currencyData.value,
+    // },
     {
-      type: "selectInput",
+      type: "number",
       prop: "price",
-      selectProp: "currency",
-      label: "销售价",
+      label: "销售价" + (isShowLabel.value ? "(cm²)" : ""),
+      precision: 2,
+      min: 0.01,
+      controls: false,
       itemWidth: 50,
-      disabledSelect: true,
-      data: currencyData.value,
+      isShow: !isSpecial.value,
     },
+    // {
+    //   type: "selectInput",
+    //   prop: "price",
+    //   selectProp: "currency",
+    //   label: "销售价",
+    //   itemWidth: 50,
+    //   disabledSelect: true,
+    //   data: currencyData.value,
+    // },
     {
       type: "slot",
       slotName: "size",
       prop: "size",
-      label: "尺寸",
+      label: "",
       itemWidth: 50,
       disabled: false,
+      isShow: !isSpecial.value,
     },
     {
       type: "number",
@@ -409,6 +654,7 @@ const formConfig = computed(() => {
       min: 0,
       controls: false,
       itemWidth: 50,
+      isShow: !isSpecial.value,
     },
   ];
 });
@@ -430,25 +676,37 @@ const getList = async (req) => {
     }
   });
 };
-
+const isShowNoAttributes = ref(false);
 const treeChange = (e) => {
+  console.log(e, "asa");
   if (e.id != undefined) {
     sourceList.value.pagination.productClassifyId = e.id;
     getList({ productClassifyId: e.id });
+    if (e.id == "110") {
+      isShowNoAttributes.value = true;
+    } else {
+      if (e.parentIdSet) {
+        isShowNoAttributes.value = e.parentIdSet.includes("110");
+      } else {
+        isShowNoAttributes.value = false;
+      }
+    }
   }
 };
 
+const isSpecial = ref(false);
 const openModal = () => {
+  isSpecial.value = false;
   dialogVisible.value = true;
   modalType.value = "add";
   formData.data = {
     definition: "2",
     fileList: [],
   };
-  if (currencyData.value && currencyData.value.length > 0) {
-    formData.data.currency = currencyData.value[0].dictKey;
-    formData.data.costCurrency = currencyData.value[0].dictKey;
-  }
+  // if (currencyData.value && currencyData.value.length > 0) {
+  //   formData.data.currency = currencyData.value[0].dictKey;
+  //   formData.data.costCurrency = currencyData.value[0].dictKey;
+  // }
 };
 
 const submitForm = () => {
@@ -473,13 +731,9 @@ const submitForm = () => {
 
 const getTreeList = () => {
   proxy
-    .post("/productClassify/tree", {
-      parentId: "",
-      name: "",
-      definition: "2",
-      isNeRawMaterial: props.isNeRawMaterial,
-    })
+    .post("/productClassify/tree", { parentId: "", name: "", definition: "2" })
     .then((message) => {
+      message = message.map((x) => ({ ...x, id: x.id + "" }));
       treeListData.value = [
         {
           id: "",
@@ -492,10 +746,58 @@ const getTreeList = () => {
     });
 };
 
+const changeProductClassifyId = (val) => {
+  let current = findNodeById(treeData.value, val);
+  if (current) {
+    // 判断是否是无属性原材料
+    if (current.id == 110) {
+      isSpecial.value = true;
+    } else {
+      if (current.parentIdSet) {
+        // 判断父级id是否包含无属性原材料
+        isSpecial.value = current.parentIdSet.includes("110");
+      } else {
+        // 不是无属性原材料
+        isSpecial.value = false;
+      }
+    }
+
+    if (isSpecial.value == true) {
+      for (const key in formData.data) {
+        if (
+          [
+            "id",
+            "name",
+            "customCode",
+            "price",
+            "productClassifyId",
+            "definition",
+            "fileList",
+          ].includes(key)
+        ) {
+        } else {
+          delete formData.data[key];
+        }
+      }
+    }
+
+    if (current.id == 100) {
+      isShowLabel.value = true;
+    } else {
+      if (current.parentIdSet) {
+        isShowLabel.value = current.parentIdSet.includes("100");
+      } else {
+        isShowLabel.value = false;
+      }
+    }
+  }
+};
+
 const getDtl = (row) => {
   modalType.value = "edit";
   proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
     formData.data = res;
+    changeProductClassifyId(res.productClassifyId);
     formData.data.fileList = row.fileList.map((x) => ({
       ...x,
       url: x.fileUrl,
@@ -528,6 +830,93 @@ const handleClickFile = (file) => {
 getTreeList();
 getList();
 
+const associationConfig = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "产品图片",
+        slot: "pic",
+        align: "center",
+        width: 80,
+      },
+    },
+    {
+      attrs: {
+        label: "产品编码",
+        prop: "customCode",
+        width: 190,
+      },
+    },
+    {
+      attrs: {
+        label: "产品名称",
+        prop: "name",
+        "min-width": 300,
+      },
+    },
+    {
+      attrs: {
+        label: "尺寸",
+        slot: "size",
+        width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "产品颜色",
+        prop: "color",
+        width: 160,
+      },
+    },
+  ];
+});
+const associationData = ref({
+  data: [],
+  pagination: {
+    pageNum: 1,
+    pageSize: 10,
+    total: 3,
+  },
+});
+const openAssociationProduct = ref(false);
+const getAssociationList = (req = {}) => {
+  associationData.value.pagination = {
+    ...associationData.value.pagination,
+    ...req,
+  };
+  proxy
+    .post(
+      "/productInfo/getProductByMaterialId",
+      associationData.value.pagination
+    )
+    .then((res) => {
+      associationData.value.data = res.rows;
+      associationData.value.pagination.total = res.total;
+      let productIds = associationData.value.data.map((x) => x.id);
+      if (productIds && productIds.length > 0) {
+        proxy.getFileData({
+          businessIdList: productIds,
+          data: associationData.value.data,
+          att: "id",
+          businessType: "0",
+          fileAtt: "fileList",
+          filePathAtt: "fileUrl",
+        });
+      }
+    });
+};
+
+const getAssociationProduct = (row) => {
+  openAssociationProduct.value = true;
+  associationData.value.pagination = {
+    pageNum: 1,
+    pageSize: 10,
+    total: 3,
+    materialId: row.id,
+  };
+  getAssociationList();
+};
+
 const clickSelect = (item) => {
   proxy.$emit("selectMaterial", item);
 };
@@ -535,12 +924,11 @@ const clickSelect = (item) => {
 
 <style lang="scss" scoped>
 .user {
-  // padding: 20px;
+  padding: 10px;
   display: flex;
   justify-content: space-between;
   .tree {
     width: 300px;
-    border-right: 1px solid rgb(223, 221, 221);
   }
   .content {
     width: calc(100% - 310px);

+ 27 - 2
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -345,7 +345,7 @@ const status = ref([
     value: 10,
   },
   {
-    label: "驳回",
+    label: "审批驳回",
     value: 20,
   },
   {
@@ -810,6 +810,19 @@ const config = computed(() => {
           //       },
           //     }
           //   : {},
+          row.status == 0
+            ? {
+                attrs: {
+                  label: "修改",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickUpdate(row);
+                },
+              }
+            : {},
           row.status == 30 && row.produceStatus != 10
             ? {
                 attrs: {
@@ -1051,7 +1064,7 @@ const newContract = () => {
     path: "/platform_manage/process/processApproval",
     query: {
       flowKey: flowKey,
-      flowName: "订单流程",
+      flowName: "订单发起流程",
       random: proxy.random(),
     },
   });
@@ -1337,6 +1350,18 @@ const clickAlteration = (row) => {
   });
 };
 
+const clickUpdate = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "contract_flow",
+      flowName: "订单发起流程",
+      businessId: row.id,
+      random: proxy.random(),
+    },
+  });
+};
+
 const PdfDom = ref(null);
 const exportExcel = () => {
   PdfDom.value.exportExcel();

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

@@ -4,7 +4,7 @@
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                :selectConfig="selectConfig" :action-list="[
               
-        ]" @get-list="getList">
+        ]" @get-list="getList" :row-class-name="getRowClass">
 
         <template #code="{ item }">
           <div style="width: 100%" class="el-click" @click="lookDetails(item)">
@@ -1109,8 +1109,14 @@ const submitConfirm = (type) => {
       });
   });
 };
-</script>
 
+const getRowClass = ({ row }) => {
+  if (row.isOverdue == "1") {
+    return "redClass";
+  }
+  return "";
+};
+</script>
 <style lang="scss" scoped>
 ::v-deep(.el-progress__text) {
   font-size: 14px !important;
@@ -1182,4 +1188,12 @@ const submitConfirm = (type) => {
 :deep(.bom-table .el-table__body-wrapper .el-table__body .el-table__row) {
   background: #f4f4f5 !important;
 }
+::v-deep(.redClass) {
+  // color: #fff !important;
+  background-color: #fbdbdb !important;
+  .el-table-fixed-column--left,
+  .el-table-fixed-column--right {
+    background-color: #fbdbdb;
+  }
+}
 </style>

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

@@ -1,5 +1,5 @@
 <template>
-  <div class="pageIndexClass">
+  <div class="pageIndexClass  a">
     <byTable :hideTable="true" :hidePagination="true" :config="[]" highlight-current-row :selectConfig="selectConfig" :action-list="[ {
                 text: '打印任务单',
                 action: () => openModal('add'),
@@ -23,11 +23,7 @@
     </div>
     <div v-if="['1','2','3','4'].includes(pageActiveName)">
       <byTable :hideSearch="true" :otherHeight="80" :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading"
-               highlight-current-row :selectConfig="selectConfig" :action-list="[ {
-                text: '打印任务单',
-                action: () => openModal('add'),
-                disabled: selectIds.length==0,
-              } 
+               highlight-current-row :selectConfig="[]" :action-list="[ 
               
         ]" :table-events="{
              select: selectRow,
@@ -516,6 +512,7 @@ import byForm from "@/components/byForm/index";
 import QRCode from "qrcodejs2-fix";
 import moment from "moment";
 import SelectProductionTask from "@/views/MES/productionTask/selectProductionTask.vue";
+import { nextTick } from "vue";
 
 const { proxy } = getCurrentInstance();
 const contractTag = computed(
@@ -523,6 +520,7 @@ const contractTag = computed(
 );
 const pageActiveName = ref("1");
 const handlePageTabChange = (val) => {
+  selectIds.value = [];
   switch (val) {
     case "1":
       break;
@@ -729,7 +727,7 @@ const config = ref([
       label: "是否逾期",
       slot: "isOverdue",
       width: 80,
-      fixed: "left",
+      // fixed: "left",
     },
   },
   {
@@ -1094,6 +1092,12 @@ const getList = async (req) => {
       setTimeout(() => {
         loading.value = false;
       }, 200);
+      // nextTick(() => {
+      //   let doms = document.querySelectorAll(".redClass");
+      //   for (let i = 0; i < doms.length; i++) {
+      //     doms[i].style.backgroundColor = "red";
+      //   }
+      // });
       const productIdList = res.rows.map((x) => x.productId);
       // 请求文件数据并回显
       if (productIdList.length > 0) {
@@ -1477,7 +1481,9 @@ const getRowClass = ({ row }) => {
   if (row.isOverdue == "1") {
     return "redClass";
   }
+  return "";
 };
+
 const formDomOne = ref(null);
 const formDataOne = reactive({
   data: {},
@@ -1639,11 +1645,15 @@ const submitFormOne = () => {
   // background: #f3f3f3;
   // height: 50px;
 }
-.redClass {
-  background: red !important;
-  background-color: red !important;
-  // color:  !important;
+::v-deep(.redClass) {
+  // color: #fff !important;
+  background-color: #fbdbdb !important;
+  .el-table-fixed-column--left,
+  .el-table-fixed-column--right {
+    background-color: #fbdbdb;
+  }
 }
+
 .red {
   background: red;
   border-radius: 2px;
@@ -1660,3 +1670,4 @@ const submitFormOne = () => {
   }
 }
 </style>
+

+ 76 - 5
src/views/process/processApproval/index.vue

@@ -79,10 +79,37 @@
                 </div>
               </el-form-item>
               <el-form-item>
-                <el-button type="primary" v-if="approvalRecordData.buttonInfoList.length == 0" @click="handleSubmit"
-                           :loading="btnLoading">提交</el-button>
-                <el-button type="primary" v-else v-for="i in approvalRecordData.buttonInfoList" :key="i.type" :loading="btnLoading"
-                           @click="handleSubmit(i.type)" style="margin-bottom:10px">{{ i.name }}</el-button>
+                <div style="text-align:center;width:100%">
+                  <el-button type="primary" v-if="approvalRecordData.buttonInfoList.length == 0" @click="handleSubmit"
+                             :loading="btnLoading">提交</el-button>
+                  <el-button type="primary" v-if="
+                approvalRecordData.buttonInfoList.length == 0 &&
+                StagFlowKey.includes(flowForm.flowKey)
+              " @click="handleSubmitStag" :loading="btnLoading">暂存</el-button>
+
+                  <div v-else>
+                    <!-- 按钮长度小于2 -->
+                    <template v-for="(item,index) in approvalRecordData.buttonInfoList" :key="item.type">
+                      <el-button type="primary" :loading="btnLoading" @click="handleSubmit(item.type)" style="margin-bottom:10px"
+                                 v-if="index<2">{{ item.name }}</el-button>
+                    </template>
+                    <!-- 大于等于2 -->
+                    <template v-if="approvalRecordData.buttonInfoList.length>=2">
+                      <el-popover placement="bottom-start" title="" :width="120" trigger="hover">
+                        <div style="text-align:center;width:100%">
+                          <div v-for="(item,index) in approvalRecordData.buttonInfoList" :key="item.type" style="text-align:center;width:100%">
+                            <el-button type="primary" :loading="btnLoading" @click="handleSubmit(item.type)" style="margin-bottom:10px"
+                                       v-if="index>=2">
+                              {{ item.name }}</el-button>
+                          </div>
+                        </div>
+                        <template #reference>
+                          <el-button type="primary" style="margin-bottom:10px;">更多</el-button>
+                        </template>
+                      </el-popover>
+                    </template>
+                  </div>
+                </div>
               </el-form-item>
             </el-form>
 
@@ -131,7 +158,7 @@
       </el-tabs>
     </div>
 
-    <el-dialog :title="dialogTitle" width="400" v-model="dialogVisible" v-if="dialogVisible" :show-close="true" :close-on-click-modal="false"
+    <el-dialog :title="dialogTitle" width="400" v-model="dialogVisible" v-if="dialogVisible" :show-close="false" :close-on-click-modal="false"
                :close-on-press-escape="false">
       <el-form :model="flowForm">
         <el-form-item label="处理人" v-if="nextHandleUser && nextHandleUser.length>0">
@@ -192,6 +219,7 @@ const route = useRoute();
 const props = defineProps({
   query: Object,
 });
+const StagFlowKey = ref(["contract_flow", "subscribe_flow"]);
 // tab切换逻辑
 const activeName = ref("first");
 let auxiliaryData = ref([]);
@@ -353,6 +381,49 @@ const handleSubmit = async (_type) => {
     console.log("数据未填完整!", err);
   }
 };
+
+// 暂存
+const handleSubmitStag = async (_type) => {
+  try {
+    // 调用发起组件的提交事件
+    const flag = await makeDom.value.handleSubmit(true);
+    if (flag) {
+      flowFormDom.value.validate((valid) => {
+        btnLoading.value = true;
+        if (valid) {
+          const data = { ...makeDom.value.getFormData() };
+          flowForm.fileList = flowForm.fileList.map((item) => {
+            return {
+              ...item,
+              ...item.raw,
+            };
+          });
+          if (flowForm.flowKey == "contract_flow") {
+            proxy.post("/saleQuotation/add", data).then(
+              (res) => {
+                skipPage();
+              },
+              (err) => {
+                btnLoading.value = false;
+              }
+            );
+          } else if (flowForm.flowKey == "subscribe_flow") {
+            proxy.post("/contract/add", data).then(
+              (res) => {
+                skipPage();
+              },
+              (err) => {
+                btnLoading.value = false;
+              }
+            );
+          }
+        }
+      });
+    }
+  } catch (err) {
+    console.log("数据未填完整!", err);
+  }
+};
 // 页面跳转
 const skipPage = () => {
   let pageObj = {

+ 11 - 11
src/views/process/processConfig/vueFlow.vue

@@ -247,16 +247,20 @@ const formConfig = computed(() => {
           disabled: true,
         },
         {
-          label: "驳回",
-          value: 2,
-        },
-        {
           label: "退回",
-          value: 3,
+          value: 8,
         },
+        // {
+        //   label: "退回",
+        //   value: 3,
+        // },
+        // {
+        //   label: "退回到发起人",
+        //   value: 4,
+        // },
         {
-          label: "退回到发起人",
-          value: 4,
+          label: "驳回",
+          value: 2,
         },
         {
           label: "加签",
@@ -266,10 +270,6 @@ const formConfig = computed(() => {
           label: "移交",
           value: 7,
         },
-        {
-          label: "退回到指定节点",
-          value: 8,
-        },
       ],
     },
     {

+ 175 - 20
src/views/product/material/index.vue

@@ -13,7 +13,48 @@
                 action: () => openModal('add'),
                 disabled: false,
               },
-        ]" @get-list="getList">
+        ]" @get-list="getList" v-if="!isShowNoAttributes">
+        <template #pic="{ item }">
+          <div v-if="item.fileList.length > 0">
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
+          </div>
+          <div v-else></div>
+        </template>
+        <template #name="{ item }">
+          <div>
+            <span class="el-click">{{ item.name }}</span>
+          </div>
+        </template>
+        <template #size="{ item }">
+          <div v-if="item['length'] && item.width && item.height">
+            <span>{{ item['length'] }}</span>*
+            <span>{{ item.width }}</span>*
+            <span>{{ item.height }}</span>
+          </div>
+          <div v-else></div>
+        </template>
+        <template #price="{ item }">
+          <div v-if="item.price">
+            <span>{{ item.currency }} {{ moneyFormat(item.price ,2)}}</span>
+          </div>
+          <div v-else></div>
+        </template>
+        <template #costPrice="{ item }">
+          <div v-if="item.costPrice">
+            <span>{{ item.currency }} {{ moneyFormat(item.costPrice ,2)}}</span>
+          </div>
+          <div v-else></div>
+        </template>
+      </byTable>
+
+      <byTable :source="sourceList.data" :tableHeight="tableHeight" :pagination="sourceList.pagination" :config="configOne" :loading="loading"
+               highlight-current-row :selectConfig="selectConfig" :action-list="[
+              {
+                text: '添加物料',
+                action: () => openModal('add'),
+                disabled: false,
+              },
+        ]" @get-list="getList" v-else>
         <template #pic="{ item }">
           <div v-if="item.fileList.length > 0">
             <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
@@ -197,6 +238,106 @@ const rules = ref({
 });
 
 const selectConfig = computed(() => []);
+const configOne = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "图片",
+        slot: "pic",
+        align: "center",
+        width: 80,
+      },
+    },
+    {
+      attrs: {
+        label: "物料分类",
+        prop: "classifyName",
+        "min-width": 200,
+      },
+    },
+    {
+      attrs: {
+        label: "物料编码",
+        prop: "customCode",
+        width: 190,
+      },
+    },
+    {
+      attrs: {
+        label: "物料名称",
+        slot: "name",
+        "min-width": 300,
+      },
+    },
+    {
+      attrs: {
+        label: "销售价",
+        prop: "price",
+        width: 100,
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "180",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "产品反查",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getAssociationProduct(row);
+            },
+          },
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              proxy
+                .msgConfirm()
+                .then((res) => {
+                  proxy
+                    .post("/productInfo/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      proxy.msgTip("删除成功", 1);
+                      getList();
+                    });
+                })
+                .catch((err) => {});
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
 const config = computed(() => {
   return [
     {
@@ -421,6 +562,16 @@ const formConfig = computed(() => {
       disabled: false,
     },
     {
+      type: "number",
+      prop: "price",
+      label: "销售价(cm²)",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      isShow: isSpecial.value,
+    },
+    {
       type: "uploadImg",
       // limit: 1,
       // listType: "picture-card",
@@ -428,7 +579,7 @@ const formConfig = computed(() => {
       imgProp: "imageUrl",
       prop: "fileList",
       label: "物料缩略图",
-      isShow: !isSpecial.value,
+      // isShow: !isSpecial.value,
     },
     {
       type: "title1",
@@ -545,16 +696,6 @@ const formConfig = computed(() => {
       itemWidth: 50,
       isShow: !isSpecial.value,
     },
-    {
-      type: "number",
-      prop: "price",
-      label: "销售价(cm²)",
-      precision: 2,
-      min: 0.01,
-      controls: false,
-      itemWidth: 50,
-      isShow: isSpecial.value,
-    },
     // {
     //   type: "selectInput",
     //   prop: "price",
@@ -603,11 +744,21 @@ const getList = async (req) => {
     }
   });
 };
-
+const isShowNoAttributes = ref(false);
 const treeChange = (e) => {
+  console.log(e, "asa");
   if (e.id != undefined) {
     sourceList.value.pagination.productClassifyId = e.id;
     getList({ productClassifyId: e.id });
+    if (e.id == "110") {
+      isShowNoAttributes.value = true;
+    } else {
+      if (e.parentIdSet) {
+        isShowNoAttributes.value = e.parentIdSet.includes("110");
+      } else {
+        isShowNoAttributes.value = false;
+      }
+    }
   }
 };
 
@@ -628,10 +779,8 @@ const openModal = () => {
 
 const submitForm = () => {
   formDom.value.handleSubmit((valid) => {
-    if (!isSpecial.value) {
-      if (!formData.data.fileList.length > 0) {
-        return proxy.msgTip("请上传图片", 2);
-      }
+    if (!formData.data.fileList.length > 0) {
+      return proxy.msgTip("请上传图片", 2);
     }
     submitLoading.value = true;
     proxy.post("/productInfo/" + modalType.value, formData.data).then(
@@ -684,9 +833,15 @@ const changeProductClassifyId = (val) => {
     if (isSpecial.value == true) {
       for (const key in formData.data) {
         if (
-          ["id", "name", "customCode", "price", "productClassifyId"].includes(
-            key
-          )
+          [
+            "id",
+            "name",
+            "customCode",
+            "price",
+            "productClassifyId",
+            "definition",
+            "fileList",
+          ].includes(key)
         ) {
         } else {
           delete formData.data[key];

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

@@ -521,8 +521,13 @@ watch(selectData, (newVal, oldVal) => {
         }
       });
     } else {
+      // sourceList.value.data.forEach((x) => {
+      //   if (x.dataType !== current.dataType) {
+      //     x.isCheck = false;
+      //   }
+      // });
       sourceList.value.data.forEach((x) => {
-        if (x.dataType !== current.dataType) {
+        if (x.subcribeId !== current.subcribeId) {
           x.isCheck = false;
         }
       });

+ 2 - 0
src/views/purchaseManage/purchaseManage/subscribe/index.vue

@@ -130,6 +130,7 @@ let fileList = ref([]);
 let rules = ref({
   name: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
 });
+
 const statusData = ref([
   {
     label: "审批中",
@@ -152,6 +153,7 @@ const statusData = ref([
     value: "99",
   },
 ]);
+
 const selectConfig = computed(() => [
   {
     label: "状态",

+ 34 - 34
src/views/purchaseManage/supplier/supplier/index.vue

@@ -470,12 +470,44 @@ const formConfig = computed(() => {
       prop: "fax",
       itemType: "text",
     },
+    // {
+    //   type: "upload",
+    //   listType: "text",
+    //   accept: "",
+    //   prop: "fileList",
+    //   label: "上传附件",
+    // },
+    {
+      type: "select",
+      prop: "privIncludingTax",
+      label: "报价是否含税",
+      required: true,
+      filterable: true,
+      data: [
+        {
+          label: "是",
+          value: "1",
+        },
+        {
+          label: "否",
+          value: "0",
+        },
+      ],
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "privTaxPoints",
+      label: "供应商税点",
+      itemType: "text",
+      itemWidth: 50,
+    },
     {
       type: "upload",
       listType: "text",
       accept: "",
-      prop: "fileList",
-      label: "上传附件",
+      prop: "licenseFileList",
+      label: "供应商营业执照附件",
     },
     {
       type: "input",
@@ -587,38 +619,6 @@ const formConfig = computed(() => {
       itemType: "text",
       itemWidth: 50,
     },
-    {
-      type: "select",
-      prop: "privIncludingTax",
-      label: "报价是否含税",
-      required: true,
-      filterable: true,
-      data: [
-        {
-          label: "是",
-          value: "1",
-        },
-        {
-          label: "否",
-          value: "0",
-        },
-      ],
-      itemWidth: 50,
-    },
-    {
-      type: "input",
-      prop: "privTaxPoints",
-      label: "供应商税点",
-      itemType: "text",
-      itemWidth: 50,
-    },
-    {
-      type: "upload",
-      listType: "text",
-      accept: "",
-      prop: "licenseFileList",
-      label: "供应商营业执照附件",
-    },
   ];
 });
 

+ 1 - 3
src/views/purchaseManage/supplier/supplyPrice/index.vue

@@ -335,12 +335,10 @@ const formConfig = computed(() => [
     itemWidth: 50,
   },
   {
-    type: "select",
+    type: "input",
     prop: "unit",
     label: "单位",
     disabled: true,
-    filterable: true,
-    data: materialUnit.value,
     isShow: modalType.value == "edit",
     itemWidth: 50,
   },