cz 1 жил өмнө
parent
commit
839f09d00d

+ 62 - 7
src/components/process/SF/CostControl.vue

@@ -319,14 +319,37 @@
                   <el-form-item :prop="'costControlDetailList.' + $index + '.accountSubjectsId'" :rules="rules.accountSubjectsId"
                                 :inline-message="true" class="margin-b-0">
                     <el-tree-select v-model="row.accountSubjectsId" :data="accountSubjectsData" check-strictly :render-after-expand="false"
-                                    node-key="id" :props="defaultProps" style="width:100%" disabled />
+                                    node-key="id" :props="defaultProps" style="width:100%" :disabled="getAccountSubjectsId" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="核算项目名称" width="110" prop="accountSubjectsName" v-if="isShowAtt('accountSubjectsId','detailObj')">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-input v-model="row.accountSubjectsName" placeholder=" " :disabled="getAccountSubjectsId">
+                  </el-input>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="核算项目" width="100" prop="accountSubjectsName" v-if="isShowAtt('accountSubjectsId','detailObj')">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-input v-model="row.accountSubjectsName" placeholder=" " :disabled="getAccountSubjectsId">
+                  </el-input>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="记账金额" width="140" prop="money" v-if="isShowAtt('money','detailObj')">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'costControlDetailList.' + $index + '.money'" :rules="rules.money" :inline-message="true" class="margin-b-0">
+                    <el-input-number onmousewheel="return false;" v-model="row.money" placeholder=" " style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" :disabled="getAccountSubjectsId" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="核算项目名称" width="110" prop="accountSubjectsName" v-if="isShowAtt('accountSubjectsId','detailObj')" />
-            <el-table-column label="核算项目" width="100" prop="accountSubjectsName" v-if="isShowAtt('accountSubjectsId','detailObj')" />
-            <el-table-column label="记账金额" width="100" prop="money" v-if="isShowAtt('money','detailObj')" />
             <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!judgeStatus()">
               <template #default="{ $index }">
                 <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
@@ -483,7 +506,7 @@ const formConfig = computed(() => {
       prop: "voucherNo",
       label: "记账凭证号",
       itemType: "text",
-      disabled: false,
+      disabled: !isHaveFinance.value || !isHaveAccount.value,
       itemWidth: 25,
       isShow: isShowAtt("voucherNo", "mainObj"),
     },
@@ -959,11 +982,14 @@ const getDeptData = (val) => {
       deptData.value = proxy.handleTree(res.data, "deptId");
     });
 };
-
+// 本期应付
 const getCurrentPayableDisabled = ref(false);
+// 记账科目
+const getAccountSubjectsId = ref(false);
 const changeCostType = (val) => {
   currentCostTypeData.value = paymentTypeData.value.find((x) => x.value == val);
   formData.data.tradeType = currentCostTypeData.value.tradeType;
+  // 本期应付
   if (
     currentCostTypeData.value.name.indexOf("备用金申请") != -1 ||
     currentCostTypeData.value.name.indexOf("借款") != -1
@@ -972,6 +998,23 @@ const changeCostType = (val) => {
   } else {
     getCurrentPayableDisabled.value = true;
   }
+  // 记帐科目
+  if (
+    currentCostTypeData.value.name.indexOf("备用金申请") != -1 ||
+    currentCostTypeData.value.name.indexOf("借款") != -1 ||
+    currentCostTypeData.value.name.indexOf("快递") != -1 ||
+    currentCostTypeData.value.name.indexOf("货款(预付)") != -1 ||
+    currentCostTypeData.value.name.indexOf("归还") != -1
+  ) {
+    getAccountSubjectsId.value = true;
+  } else {
+    if (isHaveAccount.value || isHaveFinance.value) {
+      getAccountSubjectsId.value = false;
+    } else {
+      getAccountSubjectsId.value = true;
+    }
+  }
+
   if (formData.data && formData.data.applyUserId) {
     changApplyUserId(formData.data.applyUserId);
   }
@@ -1638,13 +1681,25 @@ const getAllData = (businessId) => {
     }
   });
 };
-
+// 普通表单
 const isDisabled = ref(false);
+// 会计
+const isHaveAccount = ref(false);
+// 财务
+const isHaveFinance = ref(false);
+
 onMounted(() => {
   formData.data.companyIdSet.push(proxy.useUserStore().user.companyId);
   getDeptData(formData.data.companyId);
   isDisabled.value = judgeStatus();
   // formOption.disabled = judgeStatus();
+  console.log(proxy.useUserStore().roles, "WDAWDS");
+  if (proxy.useUserStore().roles.includes("accountant")) {
+    isHaveAccount.value = true;
+  }
+  if (proxy.useUserStore().roles.includes("cfo")) {
+    isHaveFinance.value = true;
+  }
   if (route.query && route.query.businessId && route.query.processType) {
     let businessId = route.query.businessId;
     getAllData(businessId);

+ 60 - 31
src/views/EHSD/procurement/arrivalRecord/index.vue

@@ -12,6 +12,15 @@
           </div>
         </template>
 
+        <template #size="{ item }">
+          <div v-if="item.productLength && item.productWidth && item.productHeight">
+            <span>{{ item.productLength }}</span>*
+            <span>{{ item.productWidth }}</span>*
+            <span>{{ item.productHeight }}</span>
+          </div>
+          <div v-else></div>
+        </template>
+
       </byTable>
     </div>
 
@@ -85,6 +94,20 @@ const warehouseListOne = ref([]);
 const materialUnitData = computed(
   () => proxy.useUserStore().allDict["material_unit"]
 );
+const inBoundStatus = ref([
+  {
+    label: "待入库",
+    value: 0,
+  },
+  {
+    label: "部分入库",
+    value: 1,
+  },
+  {
+    label: "入库完成",
+    value: 2,
+  },
+]);
 const inBoundReason = ref([
   {
     label: "借用归还",
@@ -163,8 +186,8 @@ const config = computed(() => {
     {
       attrs: {
         label: "采购单号",
-        prop: "code",
-        width: 120,
+        prop: "purchaseCode",
+        width: 140,
         fixed: "left",
       },
     },
@@ -172,7 +195,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "供应商",
-        prop: "warehouseName",
+        prop: "supplierName",
         width: 150,
         fixed: "left",
       },
@@ -180,9 +203,14 @@ const config = computed(() => {
     {
       attrs: {
         label: "到货日期",
-        prop: "productCustomCode",
+        prop: "arrivalTime",
         width: 100,
       },
+      render(val) {
+        if (val) {
+          return val.slice(0, 10);
+        }
+      },
     },
     {
       attrs: {
@@ -195,8 +223,8 @@ const config = computed(() => {
     {
       attrs: {
         label: "商品编码",
-        prop: "productCustomCode",
-        width: 160,
+        prop: "productCode",
+        width: 190,
       },
     },
     {
@@ -216,28 +244,31 @@ const config = computed(() => {
     {
       attrs: {
         label: "到货数量",
-        prop: "productCustomCode",
+        prop: "quantity",
         width: 100,
       },
     },
     {
       attrs: {
         label: "实际入库数量",
-        prop: "productCustomCode",
+        prop: "receiptQuantity",
         width: 110,
       },
     },
     {
       attrs: {
         label: "入库状态",
-        prop: "productCustomCode",
+        prop: "receiptStatus",
         width: 100,
       },
+      render(val) {
+        return proxy.dictValueLabel(val, inBoundStatus.value);
+      },
     },
     {
       attrs: {
         label: "账期",
-        prop: "productCustomCode",
+        prop: "accountPeriod",
         width: 100,
       },
     },
@@ -313,28 +344,26 @@ const getDict = () => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/stockJournalDetails/page", sourceList.value.pagination)
-    .then((res) => {
-      sourceList.value.data = res.rows;
-      sourceList.value.pagination.total = res.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
+  proxy.post("/arrivalDetail/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
 
-      const productIdList = res.rows.map((x) => x.productId);
-      // 请求文件数据并回显
-      if (productIdList.length > 0) {
-        proxy.getFileData({
-          businessIdList: productIdList,
-          data: sourceList.value.data,
-          att: "productId",
-          businessType: "0",
-          fileAtt: "fileList",
-          filePathAtt: "fileUrl",
-        });
-      }
-    });
+    const productIdList = res.rows.map((x) => x.productId);
+    // 请求文件数据并回显
+    if (productIdList.length > 0) {
+      proxy.getFileData({
+        businessIdList: productIdList,
+        data: sourceList.value.data,
+        att: "productId",
+        businessType: "0",
+        fileAtt: "fileList",
+        filePathAtt: "fileUrl",
+      });
+    }
+  });
 };
 getDict();
 getList();

+ 16 - 2
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -133,7 +133,7 @@
               </el-table-column>
               <!-- <el-table-column label="采购数量" prop="purchaseQuantity" width="100" /> -->
               <el-table-column label="到货数量" prop="quantity" width="100" />
-              <el-table-column label="实际入库数量" prop="receiptQuantity " width="110" />
+              <el-table-column label="实际入库数量" prop="receiptQuantity" width="110" />
               <el-table-column label="入库状态" prop="receiptStatus" width="100" :formatter="(row)=>dictValueLabel(row.receiptStatus,inBoundStatus)" />
               <el-table-column label="账期" width="150">
                 <template #default="{ row, $index }">
@@ -141,7 +141,7 @@
                     <el-form-item :prop="'arrivalDetailListOne.' + $index + '.accountPeriod'" :rules="rules.accountPeriod" :inline-message="true"
                                   class="margin-b-0">
                       <el-date-picker v-model="row.accountPeriod" type="month" placeholder="请选择" style="width: 100%" value-format="YYYY-MM"
-                                      :disabled-date="disabledFn" :clearable="false" />
+                                      :disabled-date="disabledFn" :clearable="false" @change="(val)=>handleChangeAccountPeriod(val,row)" />
 
                     </el-form-item>
                   </div>
@@ -748,6 +748,20 @@ const PdfDom = ref(null);
 const exportExcel = () => {
   PdfDom.value.exportExcel();
 };
+
+const handleChangeAccountPeriod = (val, row) => {
+  proxy
+    .post("/arrivalDetail/editAccountPeriods", {
+      id: row.id,
+      accountPeriod: val,
+    })
+    .then(
+      (res) => {
+        return proxy.msgTip("操作成功");
+      },
+      (err) => {}
+    );
+};
 </script>
 
 <style lang="scss" scoped>

+ 52 - 18
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -69,13 +69,26 @@
           </template>
 
           <template #rawMaterialIdSlot>
-            <div style="width:100%;display:flex">
-              <div style="width:calc(100% - 65px)">
+            <div style="width:100%;padding-left:15px">
+              <!-- <div style="width:calc(100% - 65px)">
                 <el-form-item label="原材料" prop="rawMaterialId" class="margin-b-0">
                   <el-input disabled v-model="formData.data.rawMaterialIdLabel" placeholder="请选择"></el-input>
                 </el-form-item>
               </div>
-              <el-button type="primary" style="width:50px;margin-left:15px" @click="openSelectRawMaterial = true" plain>选择</el-button>
+              <el-button type="primary" style="width:50px;margin-left:15px" @click="openSelectRawMaterial = true" plain>选择</el-button> -->
+              <el-button type="primary" @click="openSelectRawMaterial = true" plain>选择</el-button>
+              <el-table :data="formData.data.rawMaterialList" style="width: 100%; margin-top: 16px">
+                <el-table-column prop="rawMaterialName" label="原材料名称" />
+                <el-table-column prop="rawMaterialCode" label="原材料编码" />
+                <el-table-column label="规格尺寸 (cm)" width="140">
+                  <template #default="{ row, $index }">
+                    <div style="width: 100%" v-if="row.rawMaterialLength&&row.rawMaterialWidth && row.rawMaterialHeight">
+                      {{row.rawMaterialLength}}*{{row.rawMaterialWidth}}*{{row.rawMaterialHeight}}
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="rawMaterialColor" label="颜色" width="170" />
+              </el-table>
             </div>
           </template>
 
@@ -928,23 +941,23 @@ const formConfig = computed(() => {
       type: "slot",
       slotName: "rawMaterialIdSlot",
       label: "",
-      itemWidth: 33.33,
-      disabled: true,
-    },
-    {
-      type: "input",
-      prop: "rawMaterialSize",
-      label: "原材料尺寸",
-      itemWidth: 33.33,
-      disabled: true,
-    },
-    {
-      type: "input",
-      prop: "rawMaterialColor",
-      label: "原材料颜色",
-      itemWidth: 33.33,
+      itemWidth: 100,
       disabled: true,
     },
+    // {
+    //   type: "input",
+    //   prop: "rawMaterialSize",
+    //   label: "原材料尺寸",
+    //   itemWidth: 33.33,
+    //   disabled: true,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "rawMaterialColor",
+    //   label: "原材料颜色",
+    //   itemWidth: 33.33,
+    //   disabled: true,
+    // },
 
     // {
     //   type: "selectInput",
@@ -1249,6 +1262,16 @@ const getDtl = (row) => {
     formData.data.rawMaterialIdLabel =
       res.rawMaterialName + "," + res.rawMaterialCode;
     formData.data.rawMaterialSize = `${res.rawMaterialLength}*${res.rawMaterialWidth}*${res.rawMaterialHeight}`;
+    formData.data.rawMaterialList = [
+      {
+        rawMaterialName: res.rawMaterialName,
+        rawMaterialCode: res.rawMaterialCode,
+        rawMaterialLength: res.rawMaterialLength,
+        rawMaterialWidth: res.rawMaterialWidth,
+        rawMaterialHeight: res.rawMaterialHeight,
+        rawMaterialColor: res.rawMaterialColor,
+      },
+    ];
     formData.data.productBomDetailList =
       formData.data.productBomDetailList.filter((x) => x.type == 2);
 
@@ -1640,6 +1663,17 @@ const selectRawMaterial = (row) => {
   formData.data.rawMaterialIdLabel = row.name + "," + row.customCode;
   formData.data.rawMaterialSize = `${row["length"]}*${row.width}*${row.height}`;
   formData.data.rawMaterialColor = row.color;
+
+  formData.data.rawMaterialList = [
+    {
+      rawMaterialName: row.name,
+      rawMaterialCode: row.customCode,
+      rawMaterialLength: row["length"],
+      rawMaterialWidth: row.width,
+      rawMaterialHeight: row.height,
+      rawMaterialColor: row.color,
+    },
+  ];
   openSelectRawMaterial.value = false;
 };
 </script>

+ 54 - 20
src/views/EHSD/productLibrary/waitCreateProduct/index.vue

@@ -48,13 +48,26 @@
           </template>
 
           <template #rawMaterialIdSlot>
-            <div style="width:100%;display:flex">
-              <div style="width:calc(100% - 65px)">
+            <div style="width:100%;padding-left:15px">
+              <!-- <div style="width:calc(100% - 65px)">
                 <el-form-item label="原材料" prop="rawMaterialId" class="margin-b-0">
                   <el-input disabled v-model="formData.data.rawMaterialIdLabel" placeholder="请选择"></el-input>
                 </el-form-item>
               </div>
-              <el-button type="primary" style="width:50px;margin-left:15px" @click="openSelectRawMaterial = true" plain>选择</el-button>
+              <el-button type="primary" style="width:50px;margin-left:15px" @click="openSelectRawMaterial = true" plain>选择</el-button> -->
+              <el-button type="primary" @click="openSelectRawMaterial = true" plain>选择</el-button>
+              <el-table :data="formData.data.rawMaterialList" style="width: 100%; margin-top: 16px">
+                <el-table-column prop="rawMaterialName" label="原材料名称" />
+                <el-table-column prop="rawMaterialCode" label="原材料编码" />
+                <el-table-column label="规格尺寸 (cm)" width="140">
+                  <template #default="{ row, $index }">
+                    <div style="width: 100%" v-if="row.rawMaterialLength&&row.rawMaterialWidth && row.rawMaterialHeight">
+                      {{row.rawMaterialLength}}*{{row.rawMaterialWidth}}*{{row.rawMaterialHeight}}
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="rawMaterialColor" label="颜色" width="170" />
+              </el-table>
             </div>
           </template>
 
@@ -761,23 +774,23 @@ const formConfig = computed(() => {
       type: "slot",
       slotName: "rawMaterialIdSlot",
       label: "",
-      itemWidth: 33.33,
-      disabled: true,
-    },
-    {
-      type: "input",
-      prop: "rawMaterialSize",
-      label: "原材料尺寸",
-      itemWidth: 33.33,
-      disabled: true,
-    },
-    {
-      type: "input",
-      prop: "rawMaterialColor",
-      label: "原材料颜色",
-      itemWidth: 33.33,
+      itemWidth: 100,
       disabled: true,
     },
+    // {
+    //   type: "input",
+    //   prop: "rawMaterialSize",
+    //   label: "原材料尺寸",
+    //   itemWidth: 33.33,
+    //   disabled: true,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "rawMaterialColor",
+    //   label: "原材料颜色",
+    //   itemWidth: 33.33,
+    //   disabled: true,
+    // },
 
     // {
     //   type: "selectInput",
@@ -1082,9 +1095,19 @@ const getDtl = (row) => {
     productBomDetailList:
       row.quotationProductBomList.filter((x) => x.type == 2) || [],
     productCustomInfoList: row.quotationProductCustomInfoList || [],
-    rawMaterialIdLabel: res.rawMaterialName + "," + res.rawMaterialCode,
-    rawMaterialSize: `${res.rawMaterialLength}*${res.rawMaterialWidth}*${res.rawMaterialHeight}`,
+    rawMaterialIdLabel: row.rawMaterialName + "," + row.rawMaterialCode,
+    rawMaterialSize: `${row.rawMaterialLength}*${row.rawMaterialWidth}*${row.rawMaterialHeight}`,
   };
+  formData.data.rawMaterialList = [
+    {
+      rawMaterialName: row.rawMaterialName,
+      rawMaterialCode: row.rawMaterialCode,
+      rawMaterialLength: row.rawMaterialLength,
+      rawMaterialWidth: row.rawMaterialWidth,
+      rawMaterialHeight: row.rawMaterialHeight,
+      rawMaterialColor: row.rawMaterialColor,
+    },
+  ];
   if (
     formData.data.productCustomInfoList &&
     formData.data.productCustomInfoList.length > 0
@@ -1271,6 +1294,17 @@ const selectRawMaterial = (row) => {
   formData.data.rawMaterialIdLabel = row.name + "," + row.customCode;
   formData.data.rawMaterialSize = `${row["length"]}*${row.width}*${row.height}`;
   formData.data.rawMaterialColor = row.color;
+
+  formData.data.rawMaterialList = [
+    {
+      rawMaterialName: row.name,
+      rawMaterialCode: row.customCode,
+      rawMaterialLength: row["length"],
+      rawMaterialWidth: row.width,
+      rawMaterialHeight: row.height,
+      rawMaterialColor: row.color,
+    },
+  ];
   openSelectRawMaterial.value = false;
 };
 </script>

+ 18 - 14
src/views/systemTenant/tenant/userTenant/index.vue

@@ -351,13 +351,13 @@ const formConfig = computed(() => {
       clearable: false,
       data: companyData.value,
     },
-    {
-      type: "select",
-      label: "业务员等级",
-      prop: "saleLv",
-      multiple: false,
-      data: roleData.value,
-    },
+    // {
+    //   type: "select",
+    //   label: "业务员等级",
+    //   prop: "saleLv",
+    //   multiple: false,
+    //   data: roleData.value,
+    // },
     {
       type: "input",
       prop: "accountBank",
@@ -590,13 +590,17 @@ const submitForm = () => {
     if (formData.data.companySet && formData.data.companySet.length > 0) {
       formData.data.companySet = formData.data.companySet.join(",");
     }
-    let data = noRepeat(
-      productTree.value
-        .getHalfCheckedKeys()
-        .concat(productTree.value.getCheckedKeys())
-    );
-    data = data.filter((x) => !["-999", "-99", "-9"].includes(x));
-    formData.data.purchaseRange = data.join(",");
+    if (isShowPurchaseAtt.value) {
+      let data = noRepeat(
+        productTree.value
+          .getHalfCheckedKeys()
+          .concat(productTree.value.getCheckedKeys())
+      );
+      data = data.filter((x) => !["-999", "-99", "-9"].includes(x));
+      formData.data.purchaseRange = data.join(",");
+    } else {
+      formData.data.purchaseRange = "";
+    }
     proxy.post("/tenantUser", formData.data, method).then(() => {
       if (formData.data.password && formData.data.userId) {
         proxy