Ver Fonte

bug解决

cz há 1 ano atrás
pai
commit
f2facf29ff

+ 28 - 27
src/components/headerBar/header-bar.vue

@@ -243,7 +243,7 @@
                   <Reading />
                 </el-icon>
               </div>
-              <div>未读邮件</div>
+              <div>待审批</div>
             </div>
             <div class="job-item" style="margin-right:5px" @click="handlePushRouter(2)">
               <el-badge :value="jobData.waitFlowCount" :max="99" style="margin-right:20px;margin-top:10px" v-if="jobData.waitFlowCount">
@@ -258,10 +258,9 @@
                   <CopyDocument />
                 </el-icon>
               </div>
-              <div>待审批</div>
+              <div>待报价</div>
             </div>
-            <div class="job-item" v-if="userInfo.roles.includes('salesman') || userInfo.roles.includes('salesDirector') ||
-                 userInfo.roles.includes('salesAssistant')" @click="handlePushRouter(3)">
+            <div class="job-item" @click="handlePushRouter(3)">
               <el-badge :value="jobData.claimCount" :max="99" style="margin-right:20px;margin-top:10px" v-if="jobData.claimCount">
                 <div style="margin-top:-10px">
                   <el-icon size="20" color="#fff">
@@ -274,9 +273,9 @@
                   <Notebook />
                 </el-icon>
               </div>
-              <div>待认领</div>
+              <div>待投产</div>
             </div>
-            <div class="job-item" style="margin-right:5px" v-if="userInfo.roles.includes('purchasingOfficer') " @click=" handlePushRouter(4)">
+            <div class="job-item" style="margin-right:5px" @click=" handlePushRouter(4)">
               <el-badge :value="jobData.waitPurchaseCount" :max="99" style="margin-right:20px;margin-top:10px" v-if="jobData.waitPurchaseCount">
                 <div style="margin-top:-10px">
                   <el-icon size="20" color="#fff">
@@ -289,9 +288,9 @@
                   <ShoppingCart />
                 </el-icon>
               </div>
-              <div>待采购</div>
+              <div>待入库</div>
             </div>
-            <div class="job-item" style="margin-right:5px" v-if="userInfo.roles.includes('purchasingOfficer') " @click=" handlePushRouter(5)">
+            <div class="job-item" style="margin-right:5px" @click=" handlePushRouter(5)">
               <el-badge :value="jobData.sampleHandoverCount" :max="99" style="margin-right:20px;margin-top:10px" v-if="jobData.sampleHandoverCount">
                 <div style="margin-top:-10px">
                   <el-icon size="20" color="#fff">
@@ -304,9 +303,9 @@
                   <Tickets />
                 </el-icon>
               </div>
-              <div>样品交接单</div>
+              <div>待出库</div>
             </div>
-            <div class="job-item" v-if="userInfo.roles.includes('purchasingOfficer') " @click=" handlePushRouter(6)">
+            <div class="job-item" @click=" handlePushRouter(6)" v-if="useUserStore().user.companyId =='100'">
               <el-badge :value="jobData.contractHandoverCount" :max="99" style="margin-right:20px;margin-top:10px"
                         v-if="jobData.contractHandoverCount">
                 <div style="margin-top:-10px">
@@ -320,9 +319,9 @@
                   <Memo />
                 </el-icon>
               </div>
-              <div>合同交接单</div>
+              <div>待认领</div>
             </div>
-            <div class="job-item" style="margin-right:5px" v-if="userInfo.roles.includes('cashier') " @click=" handlePushRouter(7)">
+            <div class="job-item" style="margin-right:5px" @click=" handlePushRouter(7)" v-else>
               <el-badge :value="jobData.waitAccountPayCount" :max="99" style="margin-right:20px;margin-top:10px" v-if="jobData.waitAccountPayCount">
                 <div style="margin-top:-10px">
                   <el-icon size="20" color="#fff">
@@ -335,7 +334,7 @@
                   <Money />
                 </el-icon>
               </div>
-              <div>待打款</div>
+              <div>库存预警</div>
             </div>
           </div>
 
@@ -383,7 +382,6 @@ import Sortable from "sortablejs";
 
 const router = useRouter();
 const userStore = useUserStore();
-const userInfo = useUserStore();
 const { proxy } = getCurrentInstance();
 const sidebarRouters = ref([]);
 const sidebarRoutersCopy = ref([]);
@@ -694,19 +692,22 @@ const handleOpenDrawer = () => {
   openDrawer.value = true;
 };
 
-const handlePushRouter = (type) => {
-  let obj = {
-    1: "Mail",
-    2: "Backlog",
-    3: "Claim",
-    4: "Purchase",
-    5: "HandoverSlipSample",
-    6: "HandoverSlip",
-    7: "AccountPayment",
+const handlePushRouter = (att) => {
+  let pageObj = {
+    1: "Backlog",
+    2:
+      proxy.useUserStore().user.companyId == "100"
+        ? "PriceSheetEHSD"
+        : "PriceSheetEstimate",
+    3: "ProductionOrder",
+    4: "WaitingForStorage",
+    5: "WaitingForDelivery",
+    6: "Claim",
+    7: "InventoryInquiry",
   };
-  router.push({
-    name: obj[type],
-    params: {},
+
+  proxy.$router.push({
+    name: pageObj[att],
   });
 };
 
@@ -822,7 +823,7 @@ const showSearchStyle = (name) => {
   // height: 270px;
   margin-bottom: 20px;
   min-height: 135px;
-  max-height: 250px;
+  max-height: 300px;
   overflow: auto;
   .job-list {
     display: flex;

+ 7 - 7
src/components/process/PurchasePayment.vue

@@ -35,21 +35,21 @@
             <el-table-column prop="amount" label="合同金额" width="140" />
             <el-table-column prop="sumPayMoney" label="已付款金额" width="140" />
             <el-table-column prop="sumInvoiceMoney" label="已收发票金额" width="140" />
-            <el-table-column label="款项说明">
+            <el-table-column label="付款金额" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'payDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true" class="margin-b-0">
-                    <el-input v-model="row.remark" placeholder="请输入款项说明" style="width: 100%" />
+                  <el-form-item :prop="'payDetailList.' + $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" @change="changeMoney()" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="付款金额" width="180">
+            <el-table-column label="款项说明">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'payDetailList.' + $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" @change="changeMoney()" />
+                  <el-form-item :prop="'payDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true" class="margin-b-0">
+                    <el-input v-model="row.remark" placeholder="请输入款项说明" style="width: 100%" />
                   </el-form-item>
                 </div>
               </template>

+ 32 - 0
src/components/process/SF/Purchase.vue

@@ -731,8 +731,40 @@ const buyCorporationIdChange = (val) => {
   }
 };
 
+const changeSupplierPrice = (val) => {
+  let productIds = formData.data.purchaseProductList.map((x) => x.productId);
+  if (val && productIds && productIds.length > 0) {
+    proxy
+      .post("/supplierPrice/getSupplierPriceByProductIds", {
+        supplierInfoId: val,
+        productIdList: productIds,
+      })
+      .then((res) => {
+        if (res && Object.keys(res).length > 0) {
+          for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
+            const e = formData.data.purchaseProductList[i];
+            for (const key in res) {
+              if (e.productId === key) {
+                e.price = Number(res[key]);
+                break;
+              }
+            }
+          }
+        } else {
+          for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
+            const e = formData.data.purchaseProductList[i];
+            e.price = 0;
+          }
+        }
+        calculationAmount();
+      });
+  }
+};
 const changeSupplier = (val) => {
+  // 产品价格趋势
   changeProductPrice();
+  // 供应价格
+  changeSupplierPrice(val);
   formData.data.countryId = "";
   formData.data.provinceId = "";
   formData.data.cityId = "";

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

@@ -731,9 +731,40 @@ const buyCorporationIdChange = (val) => {
     });
   }
 };
-
+const changeSupplierPrice = (val) => {
+  let productIds = formData.data.purchaseProductList.map((x) => x.productId);
+  if (val && productIds && productIds.length > 0) {
+    proxy
+      .post("/supplierPrice/getSupplierPriceByProductIds", {
+        supplierInfoId: val,
+        productIdList: productIds,
+      })
+      .then((res) => {
+        if (res && Object.keys(res).length > 0) {
+          for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
+            const e = formData.data.purchaseProductList[i];
+            for (const key in res) {
+              if (e.productId === key) {
+                e.price = Number(res[key]);
+                break;
+              }
+            }
+          }
+        } else {
+          for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
+            const e = formData.data.purchaseProductList[i];
+            e.price = 0;
+          }
+        }
+        calculationAmount();
+      });
+  }
+};
 const changeSupplier = (val) => {
+  // 产品价格趋势
   changeProductPrice();
+  // 供应价格
+  changeSupplierPrice(val);
   formData.data.countryId = "";
   formData.data.provinceId = "";
   formData.data.cityId = "";

+ 128 - 29
src/components/process/SF/ReturnGood.vue

@@ -13,25 +13,47 @@
       </template>
       <template #details>
         <div style="width:100%">
-          <el-table :data="formData.data.claimContractList">
-            <el-table-column prop="contractCode" label="物料编码" width="140" />
-            <el-table-column prop="sumContractNotClaimMoney" label="物料名称" width="100" />
-            <el-table-column prop="sumContractNotClaimMoney" label="尺寸 (cm)" width="100" />
-            <el-table-column prop="sumContractNotClaimMoney" label="采购数量" width="100" />
-            <el-table-column prop="contractMoney" label="退货数量" min-width="150">
+          <el-table :data="formData.data.purchaseBackDetailsList">
+            <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>
+                <div v-else></div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="productCode" label="物料编码" width="160" />
+            <el-table-column prop="productName" label="物料名称" min-width="200" />
+            <el-table-column label="尺寸 (cm)" width="140">
               <template #default="{ row, $index }">
-                <el-form-item :prop="'claimContractList.' + $index + '.contractMoney'" :rules="rules.contractMoney" :inline-message="true">
-                  <el-input v-model="row.contractMoney" />
+                <div style="width: 100%">
+                  {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="purchaseQuantity" label="采购数量" width="100" />
+            <el-table-column prop="quantity" label="退货数量" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'purchaseBackDetailsList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
+                              class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
+                                   :controls="false" :min="0" />
                 </el-form-item>
               </template>
             </el-table-column>
-            <el-table-column prop="contractMoney" label="退货原因" min-width="150">
+            <el-table-column prop="remark" label="退货原因" min-width="200">
               <template #default="{ row, $index }">
-                <el-form-item :prop="'claimContractList.' + $index + '.contractMoney'" :rules="rules.contractMoney" :inline-message="true">
-                  <el-input v-model="row.contractMoney" />
+                <el-form-item :prop="'purchaseBackDetailsList.' + $index + '.remark'" :rules="row.quantity?rules.remark:''" :inline-message="true"
+                              class="margin-b-0">
+                  <el-input v-model="row.remark" />
                 </el-form-item>
               </template>
             </el-table-column>
+            <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!judgeStatus()">
+              <template #default="{ $index }">
+                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+              </template>
+            </el-table-column>
           </el-table>
         </div>
       </template>
@@ -47,7 +69,13 @@
 <script setup>
 import byForm from "@/components/byForm/index";
 import SelectPurchased from "@/views/EHSD/procurement/purchasedEHSD/selectPurchased.vue";
+import { useRoute } from "vue-router";
 const { proxy } = getCurrentInstance();
+const route = useRoute();
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
 const formData = reactive({
   data: {},
 });
@@ -76,14 +104,14 @@ const formConfig = computed(() => {
     },
     {
       type: "input",
-      prop: "supplyName",
+      prop: "supplierName",
       label: "供应商",
       itemWidth: 50,
       disabled: true,
     },
     {
       type: "number",
-      prop: "amount",
+      prop: "purchaseAmount",
       label: "采购金额",
       precision: 2,
       min: 0,
@@ -93,7 +121,7 @@ const formConfig = computed(() => {
     },
     {
       type: "number",
-      prop: "sumPayMoney",
+      prop: "payAmount",
       label: "已付款金额",
       precision: 2,
       min: 0,
@@ -115,31 +143,86 @@ const formConfig = computed(() => {
 });
 
 const rules = ref({
-  code: [{ required: true, message: "请选择订单", trigger: "blur" }],
-  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+  code: [{ required: true, message: "请选择采购订单", trigger: "blur" }],
+  // quantity: [{ required: true, message: "请输入退货数量", trigger: "blur" }],
+  remark: [{ required: true, message: "请输入退货原因", trigger: "blur" }],
 });
 
+const getAllFileData = () => {
+  let productIds = formData.data.purchaseBackDetailsList.map(
+    (x) => x.productId
+  );
+  proxy.getFileData({
+    businessIdList: productIds,
+    data: formData.data.purchaseBackDetailsList,
+    att: "productId",
+    businessType: "0",
+    fileAtt: "fileList",
+    filePathAtt: "fileUrl",
+  });
+};
 const handleSelect = (row) => {
-  console.log(row, "ssa");
   formData.data = {
     code: row.code,
-    supplyName: row.supplyName,
-    amount: row.amount,
-    sumPayMoney: row.sumPayMoney,
-    id: row.id,
+    supplierName: row.supplyName,
+    purchaseAmount: row.amount,
+    payAmount: row.sumPayMoney,
+    purchaseId: row.id,
+    purchaseBackDetailsList: [],
   };
-  openMaterial.value = false;
+  proxy.post("/ehsdPurchase/detail", { id: row.id }).then((res) => {
+    formData.data.purchaseBackDetailsList = res.purchaseProductList.map(
+      (x) => ({
+        purchaseDetailsId: x.id,
+        productId: x.productId,
+        productName: x.productName,
+        productCode: x.productCode,
+        productLength: x.productLength,
+        productWidth: x.productWidth,
+        productHeight: x.productHeight,
+        purchaseQuantity: x.quantity,
+        quantity: null,
+        remark: "",
+      })
+    );
+    proxy.msgTip("选择成功");
+    openMaterial.value = false;
+  });
+  getAllFileData();
+};
+
+const handleRemove = (index) => {
+  formData.data.purchaseBackDetailsList.splice(index, 1);
+};
+
+const judgeStatus = () => {
+  if (route.query.processType == 20 || route.query.processType == 10) {
+    return true;
+  }
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter(
+      (item) => item.status === 2 && item.nodeType !== 1
+    );
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
 };
+
 const handleSubmit = async () => {
   let flag = await formDom.value.handleSubmit(() => {});
   if (flag) {
-    if (
-      formData.data.contractProductList &&
-      formData.data.contractProductList.length > 0
-    ) {
-      return true;
-    } else {
-      proxy.msgTip("请添加至少一件商品", 2);
+    let total = 0;
+    for (let i = 0; i < formData.data.purchaseBackDetailsList.length; i++) {
+      const ele = formData.data.purchaseBackDetailsList[i];
+      total += Number(ele.quantity);
+      if (Number(ele.quantity) > Number(ele.purchaseQuantity)) {
+        proxy.msgTip("退货数量不能大于采购数量", 2);
+      }
+    }
+    if (!(total > 0)) {
+      proxy.msgTip("退货数量不能为0", 2);
       return false;
     }
   } else {
@@ -151,6 +234,22 @@ const handleSubmit = async () => {
   return flag;
 };
 
+const getAllData = (businessId) => {
+  if (businessId) {
+    proxy.post("/purchaseBack/detail", { id: businessId }).then((res) => {
+      formData.data = res;
+      getAllFileData();
+    });
+  }
+};
+
+onMounted(() => {
+  formOption.disabled = judgeStatus();
+  if (route.query.businessId && route.query.processType) {
+    getAllData(route.query.businessId);
+  }
+});
+
 const getFormData = () => {
   return proxy.deepClone(formData.data);
 };

+ 27 - 28
src/views/EHSD/procurement/profitBudgetEHSD/index.vue

@@ -3,11 +3,12 @@
     <byTable :hideTable="true" :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config"
              :statConfig="statConfig" :selectConfig="selectConfig" highlight-current-row :onMoreSearch="true" @moreSearch="clickMoreSearch"
              :action-list="[
-        {
+        
+      ]" @get-list="getList">
+      <!-- {
           text: '默认汇率',
           action: () => openModal(),
-        },
-      ]" @get-list="getList">
+        }, -->
     </byTable>
     <div style="padding: 0 20px 0px 20px; background-color: white" v-if="rateStatus">
       <el-table :data="sourceList.data" v-loading="loading" :height="tableHeight" :row-style="changeStyle">
@@ -138,7 +139,7 @@
             <div>{{ moneyFormat(row.refundableAmount ,2)}}</div>
           </template>
         </el-table-column>
-        <el-table-column label="包材金额" width="120">
+        <!-- <el-table-column label="包材金额" width="120">
           <template #default="{ row }">
             <div>{{ moneyFormat(row.peritectoidAmount,2) }}</div>
           </template>
@@ -147,7 +148,7 @@
           <template #default="{ row }">
             <div>{{ moneyFormat(row.accessoriesAmount,2) }}</div>
           </template>
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column label="拖车费" width="120">
           <template #default="{ row }">
             <div>{{ moneyFormat(row.trailerFee,2) }}</div>
@@ -186,10 +187,10 @@
           </template>
         </el-table-column>
 
-        <el-table-column label="操作" align="center" width="110" fixed="right">
+        <el-table-column label="操作" align="center" width="60" fixed="right">
           <template #default="{ row }">
             <div>
-              <el-button type="primary" @click="changeExchangeRate(row)" link>汇率</el-button>
+              <!-- <el-button type="primary" @click="changeExchangeRate(row)" link>汇率</el-button> -->
               <el-button type="primary" @click="changeBudget(row)" link>预算</el-button>
             </div>
           </template>
@@ -254,7 +255,7 @@
       </template>
     </el-dialog>
 
-    <el-dialog title="预算" v-if="openBudget" v-model="openBudget" width="400">
+    <el-dialog title="预算" v-if="openBudget" v-model="openBudget" width="40%">
       <byForm :formConfig="formBudgetConfig" :formOption="formOption" v-model="formBudgetData.data" ref="budget">
         <template #budgetMoney>
           <div style="width: 100%">
@@ -267,7 +268,7 @@
                 </template>
               </el-input>
             </el-form-item>
-            <el-form-item label="报关费" prop="customsFee" style="margin-top: 20px">
+            <el-form-item label="报关费" prop="customsFee">
               <el-input v-model="formBudgetData.data.customsFee" placeholder="请输入报关费" class="input-with-select">
                 <template #prepend>
                   <el-select v-model="formBudgetData.data.customsFeeCurrency" placeholder="请选择货币" style="width: 115px" disabled>
@@ -276,7 +277,7 @@
                 </template>
               </el-input>
             </el-form-item>
-            <el-form-item label="代理费" prop="agencyFee" style="margin-top: 20px">
+            <el-form-item label="代理费" prop="agencyFee">
               <el-input v-model="formBudgetData.data.agencyFee" placeholder="请输入代理费" class="input-with-select">
                 <template #prepend>
                   <el-select v-model="formBudgetData.data.agencyFeeCurrency" placeholder="请选择货币" style="width: 115px" disabled>
@@ -285,7 +286,7 @@
                 </template>
               </el-input>
             </el-form-item>
-            <el-form-item label="港杂费" prop="portMixedFee" style="margin-top: 20px">
+            <el-form-item label="港杂费" prop="portMixedFee">
               <el-input v-model="formBudgetData.data.portMixedFee" placeholder="请输入港杂费" class="input-with-select">
                 <template #prepend>
                   <el-select v-model="formBudgetData.data.portMixedFeeCurrency" placeholder="请选择货币" style="width: 115px" disabled>
@@ -294,7 +295,7 @@
                 </template>
               </el-input>
             </el-form-item>
-            <el-form-item label="验货红包" prop="inspectionRedPack" style="margin-top: 20px">
+            <el-form-item label="验货红包" prop="inspectionRedPack">
               <el-input v-model="formBudgetData.data.inspectionRedPack" placeholder="请输入验货红包" class="input-with-select">
                 <template #prepend>
                   <el-select v-model="formBudgetData.data.inspectionRedPackCurrency" placeholder="请选择货币" style="width: 115px" disabled>
@@ -303,7 +304,7 @@
                 </template>
               </el-input>
             </el-form-item>
-            <el-form-item label="佣金" prop="commission" style="margin-top: 20px">
+            <el-form-item label="佣金" prop="commission">
               <el-input v-model="formBudgetData.data.commission" placeholder="请输入佣金" class="input-with-select">
                 <template #prepend>
                   <el-select v-model="formBudgetData.data.commissionCurrency" placeholder="请选择货币" style="width: 115px" disabled>
@@ -312,7 +313,7 @@
                 </template>
               </el-input>
             </el-form-item>
-            <el-form-item label="其他" prop="other" style="margin-top: 20px">
+            <el-form-item label="其他" prop="other">
               <el-input v-model="formBudgetData.data.other" placeholder="请输入其他" class="input-with-select">
                 <template #prepend>
                   <el-select v-model="formBudgetData.data.otherCurrency" placeholder="请选择货币" style="width: 115px" disabled>
@@ -460,16 +461,16 @@ const statConfig = computed(() => [
         label: "支出统计(CNY)",
         type: 5,
         data: [
-          {
-            label: "包材金额",
-            num: proxy.moneyFormat(headerData.value.peritectoidSumAmount, 2),
-            color: "#FF6F67",
-          },
-          {
-            label: "配件金额",
-            num: proxy.moneyFormat(headerData.value.accessoriesSumAmount, 2),
-            color: "#FF6F67",
-          },
+          // {
+          //   label: "包材金额",
+          //   num: proxy.moneyFormat(headerData.value.peritectoidSumAmount, 2),
+          //   color: "#FF6F67",
+          // },
+          // {
+          //   label: "配件金额",
+          //   num: proxy.moneyFormat(headerData.value.accessoriesSumAmount, 2),
+          //   color: "#FF6F67",
+          // },
           {
             label: "拖车费",
             num: proxy.moneyFormat(headerData.value.trailerFeeSumAmount, 2),
@@ -831,9 +832,8 @@ const formBudgetData = reactive({
 const formBudgetConfig = computed(() => {
   return [
     {
-      type: "title",
+      type: "title1",
       title: "合同信息",
-      label: "",
     },
     {
       type: "input",
@@ -857,9 +857,8 @@ const formBudgetConfig = computed(() => {
       disabled: true,
     },
     {
-      type: "title",
+      type: "title1",
       title: "预算金额",
-      label: "",
     },
     {
       type: "slot",

+ 81 - 42
src/views/EHSD/procurement/returnGood/index.vue

@@ -12,6 +12,13 @@
             action: () => clickAdd(),
           },
         ]" @get-list="getList">
+
+        <template #code="{ item }">
+          <div style="width:100%">
+            <span class="el-click" @click="handleClickCode(item)"> {{ item.code }}</span>
+          </div>
+        </template>
+
       </byTable>
     </div>
 
@@ -83,6 +90,40 @@ const sourceList = ref({
     keyword: "",
   },
 });
+const statusData = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "变更中",
+    value: 60,
+  },
+  {
+    label: "已变更",
+    value: 70,
+  },
+  {
+    label: "作废",
+    value: 88,
+  },
+  {
+    label: "终止",
+    value: 99,
+  },
+]);
 const openMaterial = ref(false);
 const dialogVisible = ref(false);
 const openFollow = ref(false);
@@ -130,56 +171,44 @@ const config = computed(() => {
   return [
     {
       attrs: {
-        label: "售后编码",
+        label: "售后单号",
         prop: "code",
+        slot: "code",
       },
     },
     {
       attrs: {
-        label: "产品Sn",
+        label: "采购单号",
         prop: "productSn",
       },
     },
-
-    {
-      attrs: {
-        label: "产品名称",
-        prop: "productName",
-      },
-    },
-
-    {
-      attrs: {
-        label: "规格型号",
-        prop: "productSpec",
-      },
-    },
-    {
-      attrs: {
-        label: "售后金额",
-        prop: "amount",
-      },
-    },
     {
       attrs: {
-        label: "售后状态",
+        label: "审批状态",
         prop: "status",
       },
-      render(status) {
-        return status == "0" ? "进行中" : "完成";
+      render(type) {
+        return proxy.dictValueLabel(type, statusData.value);
       },
     },
     {
       attrs: {
-        label: "操作",
-        width: "200",
-        align: "center",
-        fixed: "right",
-      },
-      renderHTML(row) {
-        return [];
+        label: "退货时间",
+        prop: "createTime",
       },
     },
+
+    // {
+    //   attrs: {
+    //     label: "操作",
+    //     width: "200",
+    //     align: "center",
+    //     fixed: "right",
+    //   },
+    //   renderHTML(row) {
+    //     return [];
+    //   },
+    // },
   ];
 });
 const formData = reactive({
@@ -237,15 +266,13 @@ const formDom = ref(null);
 const getList = (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/sale/accountRunningWater/page", sourceList.value.pagination)
-    .then((res) => {
-      sourceList.value.data = res.rows;
-      sourceList.value.pagination.total = res.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-    });
+  proxy.post("/purchaseBack/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
 };
 
 const submitForm = () => {
@@ -297,7 +324,7 @@ const clickAdd = (type) => {
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
     query: {
-      flowKey: "return_good_flow",
+      flowKey: "purchase_back_flow",
       flowName: "采购退货审批流程",
       random: proxy.random(),
     },
@@ -321,6 +348,18 @@ const handleRemove = (index, type) => {
     type: "success",
   });
 };
+
+const handleClickCode = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "purchase_back_flow",
+      id: row.flowId,
+      processType: 20,
+      businessId: row.id,
+    },
+  });
+};
 </script>
   
 <style lang="scss" scoped>

+ 33 - 13
src/views/MES/productionOrder/index.vue

@@ -13,8 +13,8 @@
         </template>
 
         <template #isOverdue="{item}">
-          <div style="width: 100%" :style="'color: ' + (item.isOverdue=='1'?'red':'')">
-            {{dictValueLabel(item.isOverdue,isOverdueData)}}
+          <div style="width: 100%">
+            <span class="red" v-if="item.isOverdue=='1'"> 逾期 </span>
           </div>
         </template>
 
@@ -354,6 +354,16 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "生产状态",
+        prop: "produceStatus",
+        width: 120,
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, statusData.value);
+      },
+    },
+    {
+      attrs: {
         label: "交期",
         prop: "deliveryPeriod",
         width: 160,
@@ -366,16 +376,7 @@ const config = computed(() => {
         width: 160,
       },
     },
-    {
-      attrs: {
-        label: "生产状态",
-        prop: "produceStatus",
-        width: 120,
-      },
-      render(val) {
-        return proxy.dictValueLabel(val, statusData.value);
-      },
-    },
+
     {
       attrs: {
         label: "完工时间",
@@ -581,7 +582,20 @@ const clickDistributeProduction = (row) => {
     id: row.id,
     produceTime: moment().format("yyyy-MM-DD HH:mm:ss"),
   };
-  productionDialog.value = true;
+
+  // productionDialog.value = true;
+  proxy
+    .msgConfirm()
+    .then((res) => {
+      proxy.post("/produceOrder/putProduction", formData.data).then((res) => {
+        proxy.msgTip("操作成功");
+        formLoading.value = false;
+        productionDialog.value = false;
+        getList();
+        getRightData();
+      });
+    })
+    .catch((err) => {});
 };
 const submitProduction = () => {
   productionFormDom.value.handleSubmit(() => {
@@ -946,4 +960,10 @@ const onPicture = (path) => {
   text-align: center;
   border: 1px dashed var(--el-border-color);
 }
+.red {
+  background: red;
+  border-radius: 2px;
+  padding: 4px;
+  color: #fff;
+}
 </style>

+ 51 - 1
src/views/MES/productionScheduling/index.vue

@@ -21,6 +21,12 @@
           </div>
         </template>
 
+        <template #isOverdue="{item}">
+          <div style="width: 100%">
+            <span class="red" v-if="item.isOverdue=='1'"> 逾期 </span>
+          </div>
+        </template>
+
         <template #date="{ item }">
           <div style="width:100%; ">
             <div><el-icon :size="16" style="cursor:pointer;margin-right: 3px;position:relative;top:4px" color="#409EFF"
@@ -36,7 +42,7 @@
         <template v-for="(row) in allDay" v-slot:[row.key]="{ index }" :key="row.key">
           <div style="width:100%">
             <div style="height:12px" class="is-bk"
-                 :class="{'left-class':index>=0? isAddLeftClass(row,index):false,'right-class':index>=0? isAddRightClass(row,index):false,'all-class':index>=0? (isAddLeftClass(row,index)&&isAddRightClass(row,index)):false}"
+                 :class="{'left-class':index>=0? isAddLeftClass(row,index):false,'right-class':index>=0? isAddRightClass(row,index):false,'all-class':index>=0? (isAddLeftClass(row,index)&&isAddRightClass(row,index)):false,'red-class':index>=0?isAddRedClass(index):false}"
                  v-if="index>=0 &&sourceList.data && sourceList.data.length>0 &&  isAddClass(row.day,index)"></div>
           </div>
         </template>
@@ -117,6 +123,7 @@ const sourceList = ref({
     endDeliveryPeriod: "",
     beginTime: "",
     endTime: "",
+    isOverdue: "",
   },
 });
 const treeData = ref([]);
@@ -163,6 +170,17 @@ const changDay = (val) => {
   }
   allDay.value = list;
 };
+const isOverdueData = ref([
+  {
+    label: "是",
+    value: "1",
+  },
+  {
+    label: "否",
+    value: "0",
+  },
+]);
+
 const selectConfig = computed(() => [
   {
     label: "生产公司",
@@ -170,6 +188,11 @@ const selectConfig = computed(() => [
     data: companyData.value,
   },
   {
+    label: "是否逾期",
+    prop: "isOverdue",
+    data: isOverdueData.value,
+  },
+  {
     type: "time",
     itemType: "month",
     label: "排程日期",
@@ -211,6 +234,14 @@ const config = ref([
   },
   {
     attrs: {
+      label: "是否逾期",
+      slot: "isOverdue",
+      width: 60,
+      align: "center",
+    },
+  },
+  {
+    attrs: {
       label: "产品",
       slot: "product",
       "min-width": 280,
@@ -279,6 +310,14 @@ const isAddRightClass = (day, index) => {
     }
   }
 };
+
+const isAddRedClass = (index) => {
+  if (index >= 0 && sourceList.value.data[index]) {
+    let row = sourceList.value.data[index];
+    return row.isOverdue == "1";
+  }
+};
+
 const formData = reactive({
   data: {},
 });
@@ -370,4 +409,15 @@ getDict();
   font-size: 12px;
   line-height: 28px;
 }
+
+.red {
+  background: red;
+  border-radius: 2px;
+  padding: 4px;
+  color: #fff;
+}
+
+.red-class {
+  background: red !important;
+}
 </style>

+ 56 - 2
src/views/MES/productionTask/index.vue

@@ -28,14 +28,21 @@
           <div v-else></div>
         </template>
 
+        <template #isOverdue="{item}">
+          <div style="width: 100%">
+            <span class="red" v-if="item.isOverdue=='1'"> 逾期 </span>
+          </div>
+        </template>
+
         <template v-for="(slotItem, index) in processesData" v-slot:[slotItem.id]="{ item }" :key="slotItem.id">
           <div style="width:100%">
-            <div v-if="isShowCotent(slotItem,item)" style="font-weight:700">
+            <span v-if="isShowCotent(slotItem,item)" style="font-weight:700;min-width:50px;line-height:18px;display:inline-block"
+                  :class="showCotentQuantity(slotItem,item)">
               <!-- <el-icon :size="20" color="green">
                 <CircleCheckFilled />
               </el-icon> -->
               {{showCotent(slotItem,item)}}
-            </div>
+            </span>
             <div v-else class="no-bk">
               <!-- <el-icon :size="20" color="red">
                 <CircleClose />
@@ -256,6 +263,7 @@ const sourceList = ref({
     endDeliveryPeriod: "",
     beginTime: "",
     endTime: "",
+    isOverdue: "",
   },
 });
 const treeData = ref([]);
@@ -275,6 +283,18 @@ const statusData = ref([
     value: "2",
   },
 ]);
+
+const isOverdueData = ref([
+  {
+    label: "是",
+    value: "1",
+  },
+  {
+    label: "否",
+    value: "0",
+  },
+]);
+
 const selectConfig = computed(() => [
   {
     label: "生产公司",
@@ -287,6 +307,11 @@ const selectConfig = computed(() => [
     data: statusData.value,
   },
   {
+    label: "是否逾期",
+    prop: "isOverdue",
+    data: isOverdueData.value,
+  },
+  {
     type: "time",
     label: "交期",
     placeholder: "开始日期",
@@ -373,6 +398,13 @@ const config = ref([
   },
   {
     attrs: {
+      label: "是否逾期",
+      slot: "isOverdue",
+      width: 80,
+    },
+  },
+  {
+    attrs: {
       label: "下单时间",
       prop: "orderCreateTime",
       width: 160,
@@ -399,6 +431,7 @@ const config = ref([
       width: 160,
     },
   },
+
   {
     attrs: {
       label: "生产用时",
@@ -678,6 +711,21 @@ const showCotent = (slot, item) => {
   }
 };
 
+const showCotentQuantity = (slot, item) => {
+  if (item && item.productionTaskProgressList) {
+    const current = item.productionTaskProgressList.find(
+      (x) => x.processesId == slot.id
+    );
+    if (current && Number(current.finishQuantity) > 0) {
+      if (Number(current.finishQuantity) >= item.quantity) {
+        return "tag-active";
+      } else if (Number(current.finishQuantity) < item.quantity) {
+        return "tag-active-1";
+      }
+    }
+  }
+};
+
 const getDict = () => {
   proxy
     .get("/tenantDept/list", {
@@ -746,4 +794,10 @@ getDict();
   // background: #f3f3f3;
   // height: 50px;
 }
+.red {
+  background: red;
+  border-radius: 2px;
+  padding: 4px;
+  color: #fff;
+}
 </style>

+ 19 - 5
src/views/MES/reportDetail/index.vue

@@ -79,11 +79,11 @@ const statusData = ref([
   },
 ]);
 const selectConfig = computed(() => [
-  // {
-  //   label: "生产状态",
-  //   prop: "produceStatus",
-  //   data: statusData.value,
-  // },
+  {
+    label: "工序",
+    prop: "productionProcessesId",
+    data: processesData.value,
+  },
   // {
   //   type: "time",
   //   label: "交期",
@@ -263,6 +263,20 @@ const getDtl = (row) => {
 };
 
 getList();
+
+const processesData = ref([]);
+const getProcesses = () => {
+  proxy
+    .post("/productionProcesses/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      processesData.value = res.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.id,
+      }));
+    });
+};
+getProcesses();
 </script>
 
 <style lang="scss" scoped>

+ 4 - 4
src/views/MES/supplementaryOrder/index.vue

@@ -70,7 +70,7 @@ const dialogVisible = ref(false);
 const modalType = ref("add");
 const statusData = ref([
   {
-    label: "补单",
+    label: "报损",
     value: "1",
   },
   {
@@ -80,13 +80,13 @@ const statusData = ref([
 ]);
 const selectConfig = computed(() => [
   {
-    label: "报损类型",
+    label: "补单类型",
     prop: "type",
     data: statusData.value,
   },
   {
     type: "time",
-    label: "报损时间",
+    label: "补单时间",
     placeholder: "开始日期",
     prop: "beginTime",
     placeholderOne: "结束日期",
@@ -97,7 +97,7 @@ const config = computed(() => {
   return [
     {
       attrs: {
-        label: "报损类型",
+        label: "补单类型",
         prop: "type",
         slot: "type",
         width: 100,

+ 30 - 68
src/views/finance/fundManage/accountPayment/index.vue

@@ -17,16 +17,9 @@
         </template>
       </byTable>
     </div>
-    <el-dialog title="打款" v-if="dialogVisible" v-model="dialogVisible" width="500" v-loading="loading">
+    <el-dialog title="打款" v-if="dialogVisible" v-model="dialogVisible" width="50%" v-loading="loading">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
-        <template #fileSlot>
-          <div style="width: 100%">
-            <el-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
-                       :on-preview="onPreviewFile">
-              <el-button type="primary">文件上传</el-button>
-            </el-upload>
-          </div>
-        </template>
+
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="default">取 消</el-button>
@@ -160,9 +153,16 @@ import moment from "moment";
 import useUserStore from "@/store/modules/user";
 import FundsPDF from "@/components/PDF/fundsPDF.vue";
 import PaymentPDF from "@/components/PDF/paymentPDF.vue";
-
+const { proxy } = getCurrentInstance();
 const loading = ref(false);
 const submitLoading = ref(false);
+const accountCurrency = computed(
+  () => proxy.useUserStore().allDict["account_currency"]
+);
+const fundsType = computed(() => proxy.useUserStore().allDict["founds_type"]);
+const fundsPaymentMethod = computed(
+  () => proxy.useUserStore().allDict["funds_payment_method"]
+);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -190,14 +190,10 @@ let rules = ref({
   amount: [{ required: true, message: "请输入付款金额", trigger: "blur" }],
 });
 const submitType = ref("add");
-const accountCurrency = ref([]);
 const accountList = ref([]);
 const companyData = ref([]);
 const deptTreeData = ref([]);
 const userList = ref([]);
-const fundsType = ref([]);
-const fundsPaymentMethod = ref([]);
-const { proxy } = getCurrentInstance();
 const selectConfig = computed(() => {
   return [
     {
@@ -396,20 +392,22 @@ const byform = ref(null);
 const formConfig = computed(() => {
   return [
     {
-      type: "title",
-      label: "请款信息",
+      type: "title1",
+      title: "请款信息",
     },
     {
       type: "input",
       prop: "businessManagementName",
       label: "付款账户",
       disabled: true,
+      itemWidth: 50,
     },
     {
       type: "input",
       prop: "incomeAmount",
       label: "请款金额",
       disabled: true,
+      itemWidth: 50,
     },
     {
       type: "select",
@@ -417,30 +415,35 @@ const formConfig = computed(() => {
       label: "付款方式",
       disabled: true,
       data: fundsPaymentMethod.value,
+      itemWidth: 50,
     },
     {
       type: "input",
       prop: "name",
       label: "户名",
       disabled: true,
+      itemWidth: 50,
     },
     {
       type: "input",
       prop: "accountOpening",
       label: "银行账号",
       disabled: true,
+      itemWidth: 50,
     },
     {
       type: "input",
       prop: "openingBank",
       label: "开户银行",
       disabled: true,
+      itemWidth: 50,
     },
     {
       type: "input",
       prop: "interbankNumber",
       label: "联行号 / SWIFT Code",
       disabled: true,
+      itemWidth: 50,
     },
     {
       type: "input",
@@ -448,9 +451,10 @@ const formConfig = computed(() => {
       label: "摘要",
       disabled: true,
       itemType: "textarea",
+      itemWidth: 50,
     },
     {
-      type: "title",
+      type: "title1",
       title: "付款信息",
     },
     {
@@ -502,23 +506,15 @@ const formConfig = computed(() => {
       itemType: "textarea",
     },
     {
-      type: "slot",
+      type: "upload",
       label: "上传附件",
+      listType: "text",
+      accept: "",
       prop: "fileList",
-      slotName: "fileSlot",
     },
   ];
 });
-const fileList = ref([]);
-const uploadData = ref({});
-const uploadFile = async (file) => {
-  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
-  uploadData.value = res.uploadBody;
-  file.id = res.id;
-  file.fileName = res.fileName;
-  file.fileUrl = res.fileUrl;
-  return true;
-};
+
 const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
@@ -535,28 +531,6 @@ const recursive = (data) => {
 };
 const getDict = () => {
   proxy
-    .getDict(["account_currency", "founds_type", "funds_payment_method"])
-    .then((res) => {
-      accountCurrency.value = res.account_currency.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-      fundsType.value = res.founds_type.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-      fundsPaymentMethod.value = res.funds_payment_method.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    });
-  proxy
     .post("/accountManagement/page", { pageNum: 1, pageSize: 9999 })
     .then((res) => {
       if (res.rows && res.rows.length > 0) {
@@ -652,17 +626,6 @@ const select = (_selection, row) => {
 };
 const submitForm = () => {
   byform.value.handleSubmit(() => {
-    if (fileList.value && fileList.value.length > 0) {
-      formData.data.fileList = fileList.value.map((item) => {
-        return {
-          id: item.raw.id,
-          fileName: item.raw.fileName,
-          fileUrl: item.raw.fileUrl,
-        };
-      });
-    } else {
-      formData.data.fileList = [];
-    }
     submitLoading.value = true;
     proxy.post("/accountPayment/add", formData.data).then(
       () => {
@@ -683,9 +646,8 @@ const submitForm = () => {
 
 const getDtl = (row) => {
   proxy.post("/accountPayment/detail", { id: row.id }).then((res) => {
-    formData.data.fileList = [];
-    fileList.value = [];
     formData.data = res;
+    formData.data.fileList = [];
     if (submitType.value === "add") {
       formData.data.expensesTime = moment().format("yyyy-MM-DD HH:mm:ss");
       formData.data.currency = row.currency;
@@ -715,7 +677,7 @@ const getDtl = (row) => {
             }
             formData.data.fileList = arr;
             if (formData.data.fileList && formData.data.fileList.length > 0) {
-              fileList.value = formData.data.fileList.map((item) => {
+              formData.data.fileList = formData.data.fileList.map((item) => {
                 return {
                   raw: item,
                   name: item.fileName,
@@ -723,7 +685,7 @@ const getDtl = (row) => {
                 };
               });
             } else {
-              fileList.value = [];
+              formData.data.fileList = [];
             }
           }
         });
@@ -914,7 +876,7 @@ const fileData = reactive({
 });
 const fileConfig = computed(() => [
   {
-    type: "title",
+    type: "title1",
     title: "业务附件",
   },
   {
@@ -923,7 +885,7 @@ const fileConfig = computed(() => [
     // label: "业务附件",
   },
   {
-    type: "title",
+    type: "title1",
     title: "打款附件",
   },
   {

+ 278 - 9
src/views/index.vue

@@ -61,13 +61,27 @@
           <TitleInfo :content="'待审批'"></TitleInfo>
           <el-table :data="toBeProcessedData.rows" style="width: 100%" :height="tableHeight">
             <el-table-column prop="title" label="流程标题" />
+            <el-table-column label="操作" width="60" align="right">
+              <template #default="{row,$index}">
+                <div style="width:100%">
+                  <el-button type="primary" link style="font-size:12px" @click="pushProcessApproval(row)">办理</el-button>
+                </div>
+              </template>
+            </el-table-column>
+
           </el-table>
 
         </el-card>
         <el-card style="width:32%">
           <TitleInfo :content="'待报价'"></TitleInfo>
           <el-table :data="allData[0].rows" style="width: 100%" :height="tableHeight">
-            <el-table-column prop="code" label="报价单号" />
+            <el-table-column prop="code" label="报价单号">
+              <template #default="{row,$index}">
+                <div style="width:100%">
+                  <span class="el-click" @click="handleOpenDetail(row)">{{row.code}}</span>
+                </div>
+              </template>
+            </el-table-column>
             <el-table-column prop="amount" label="报价金额" width="110" />
           </el-table>
 
@@ -75,7 +89,13 @@
         <el-card style="width:32%">
           <TitleInfo :content="'待投产'"></TitleInfo>
           <el-table :data="allData[1].rows" style="width: 100%" :height="tableHeight">
-            <el-table-column prop="code" label="订单号" />
+            <el-table-column prop="code" label="订单号">
+              <template #default="{row,$index}">
+                <div style="width:100%">
+                  <span class="el-click" @click="lookDetails(row)">{{row.code}}</span>
+                </div>
+              </template>
+            </el-table-column>
             <el-table-column prop="deliveryPeriod" label="交期" width="150" />
           </el-table>
 
@@ -126,7 +146,13 @@
       <el-card style="margin-bottom:20px">
         <TitleInfo :content="'逾期生产订单'+` (${allData[6].total})`"></TitleInfo>
         <el-table :data="allData[6].rows" style="width: 100%" :height="tableHeightOne">
-          <el-table-column prop="code" label="订单号" />
+          <el-table-column prop="code" label="订单号">
+            <template #default="{row,$index}">
+              <div style="width:100%">
+                <span class="el-click" @click="lookDetails(row)">{{row.code}}</span>
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column prop="deliveryPeriod" label="交期" width="150" />
         </el-table>
       </el-card>
@@ -134,11 +160,11 @@
         <TitleInfo :content="'报损情况(近30天)'"></TitleInfo>
         <div class="baosun">
           <div class="theme2 q" @click="toUrl(7)">
-            <span class="label">补单</span>
+            <span class="label">报损</span>
             <span class="num">{{ reportLossesData.replenishSumQuantity }}</span>
           </div>
           <div class="theme3 q" @click="toUrl(7)">
-            <span class="label">丢</span>
+            <span class="label">丢</span>
             <span class="num">{{ reportLossesData.lossSumQuantity }}</span>
           </div>
         </div>
@@ -154,6 +180,103 @@
       </el-card>
     </div>
 
+    <el-dialog v-if="detailDialog" v-model="detailDialog" title="报价详情" width="90%" append-to-body>
+      <PriceSheetDetailList :rowData="detailRowData" dataType="1" @changeLeftData="changeLeftData"></PriceSheetDetailList>
+    </el-dialog>
+
+    <el-dialog :title="'订单详情'" v-model="dialogVisible" width="90%" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOptionOne" v-model="formData.orderData" ref="formDom">
+        <template #commodity>
+          <div style="width: 100%">
+            <el-table :data="formData.orderData.contractProductList" style="width: 100%; ">
+              <el-table-column type="expand" width="50" align="center">
+                <template #default="scope">
+                  <div style="padding-left:50px">
+                    <div style="margin-bottom:10px;">
+                      <TitleInfo content='BOM单:'></TitleInfo>
+                    </div>
+                    <el-table :data="scope.row.contractProductBomList" style="width: 100%;" border class="bom-table">
+                      <el-table-column label="图片" width="80">
+                        <template #default="{ row }">
+                          <div v-if="row.fileUrl">
+                            <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
+                          </div>
+                          <div v-else></div>
+                        </template>
+                      </el-table-column>
+                      <el-table-column prop="productCode" label="物料编码" width="190" />
+                      <el-table-column prop="productName" label="物料名称" min-width="200" />
+                      <el-table-column label="尺寸 (cm)" width="150">
+                        <template #default="{ row, $index }">
+                          <div style="width: 100%">
+                            {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                          </div>
+                        </template>
+                      </el-table-column>
+                      <el-table-column prop="quantity" label="数量" width="110" />
+                      <el-table-column prop="remark" label="备注" width="180" />
+                    </el-table>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="商品图片" width="80">
+                <template #default="{ row }">
+                  <div v-if="row.fileUrl">
+                    <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
+                  </div>
+                  <div v-else></div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productCnName" label="商品名称" min-width="130" />
+              <el-table-column prop="productCode" label="商品编码" width="130" />
+              <el-table-column label="尺寸 cm*cm*cm" width="180">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="设计图稿" width="80">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-upload :action="uploadUrl" accept=".gif, .jpeg, .jpg, .png" :show-file-list="false" :data="uploadData"
+                               :before-upload="(file)=>handleBeforeUpload(file,$index)" :on-success="()=>handleSuccess($index)">
+                      <div v-loading="row.imgLoading">
+                        <img v-if="row.imageUrl" :src="row.imageUrl" class="pic" />
+                        <!-- <el-icon v-else class="avatar-uploader-icon">
+                          <Plus />
+                        </el-icon> -->
+                      </div>
+                    </el-upload>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="生产源文件" width="140">
+                <template #default="{ row, $index }">
+                  <div style="width:100%">
+                    <div v-if="row.isShowProductFile &&row.fileListOne && row.fileListOne.length > 0">
+                      <span class="el-click" @click="onPicture(row.fileListOne[0].fileUrl)">{{row.fileListOne[0].fileName}}</span>
+                    </div>
+                    <div v-else>
+                      <div v-if="row.prodFileList && row.prodFileList.length > 0">
+                        <span class="el-click" @click="onPicture(row.prodFileList[0].fileUrl)">{{row.prodFileList[0].fileName}} (定制)</span>
+                      </div>
+                    </div>
+                  </div>
+
+                </template>
+              </el-table-column>
+              <el-table-column label="数量" width="150" prop="quantity" />
+              <el-table-column label="备注" min-width="200" prop="remark" />
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="defualt">取 消</el-button>
+      </template>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -163,6 +286,9 @@ import byTableDemo from "../components/byTable/demo";
 import html2canvas from "html2canvas";
 import JsPDF from "jspdf";
 import * as echarts from "echarts";
+import PriceSheetDetailList from "@/views/EHSD/saleContract/PriceSheetDetailList";
+import byForm from "@/components/byForm/index";
+
 const { proxy } = getCurrentInstance();
 const tableHeight = ref(0);
 const tableHeightOne = ref(0);
@@ -226,9 +352,7 @@ const pushProcessApproval = (row) => {
           flowKey: row.flowKey,
           id: row.id,
           processType: nodeType == 1 ? 30 : 10,
-          version: row.version,
           businessId: row.businessId,
-          submitType: "10",
         },
       });
     }
@@ -333,7 +457,7 @@ const getData = () => {
     .then((res) => {
       allData.value[6] = res;
     });
-  // 报损统计
+  // 补单统计
   proxy.post("/reportLossesDetails/lossesStatistics").then((res) => {
     reportLossesData.value = res;
   });
@@ -352,7 +476,7 @@ const toUrl = (att) => {
     4: "WaitingForStorage",
     5: "WaitingForDelivery",
     6: "Claim",
-    7: "SupplementaryOrder",
+    7: "InventoryInquiry",
   };
 
   proxy.$router.push({
@@ -442,6 +566,151 @@ onMounted(() => {
   pie_1Chart.setOption(option1);
   pie_1Chart.resize();
 });
+
+const detailDialog = ref(false);
+const detailRowData = ref({});
+const handleOpenDetail = (item) => {
+  detailRowData.value = item;
+  detailDialog.value = true;
+};
+
+const handleOpenOrderDetail = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "contract_flow",
+      id: row.flowId || "",
+      processType: 20,
+      businessId: row.contractId,
+    },
+  });
+};
+const formData = reactive({
+  data: {},
+  orderData: {},
+});
+const formOptionOne = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  disabled: true,
+});
+const dialogVisible = ref(false);
+const formDom = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "text",
+      prop: "code",
+      label: "合同号:",
+      disabled: true,
+      isShow: formData.orderData.code ? true : false,
+    },
+    {
+      type: "title1",
+      title: "商品信息",
+      haveLine: true,
+    },
+    {
+      type: "slot",
+      slotName: "commodity",
+      label: "",
+    },
+  ];
+});
+const getFileData = () => {
+  let ids = [];
+  formData.orderData.contractProductList.map((x) => {
+    // ids.push(x.productId);
+    x.contractProductBomList.map((y) => {
+      ids.push(y.materialId);
+    });
+  });
+  ids = Array.from(new Set(ids));
+  proxy
+    .post("/fileInfo/getList", {
+      businessIdList: ids,
+    })
+    .then((fileObj) => {
+      formData.orderData.contractProductList.map((x) => {
+        // if (fileObj[x.productId] && fileObj[x.productId].length > 0) {
+        //   x.fileUrl = fileObj[x.productId][0].fileUrl;
+        // }
+        x.contractProductBomList.map((y) => {
+          y.fileList = fileObj[y.materialId] || [];
+          if (y.fileList && y.fileList.length > 0) {
+            y.fileUrl = y.fileList[0].fileUrl;
+          }
+        });
+      });
+    });
+};
+
+const lookDetails = (item) => {
+  proxy.post("/contract/detail", { id: item.contractId }).then((res) => {
+    formData.orderData = res;
+    dialogVisible.value = true;
+    if (
+      formData.orderData.contractProductList &&
+      formData.orderData.contractProductList.length > 0
+    ) {
+      getFileData();
+      let ids = formData.orderData.contractProductList.map((x) => x.id);
+      let productIds = formData.orderData.contractProductList.map(
+        (x) => x.productId
+      );
+      proxy.getFileData({
+        businessIdList: productIds,
+        data: formData.orderData.contractProductList,
+        att: "productId",
+        businessType: "0",
+        fileAtt: "productFile",
+        filePathAtt: "fileUrl",
+      });
+
+      proxy
+        .getFileData({
+          businessIdList: ids,
+          getAll: true,
+        })
+        .then((fileObj) => {
+          for (
+            let i = 0;
+            i < formData.orderData.contractProductList.length;
+            i++
+          ) {
+            const ele = formData.orderData.contractProductList[i];
+            for (const key in fileObj) {
+              if (
+                ele.id == key &&
+                fileObj[ele.id] &&
+                fileObj[ele.id].length > 0
+              ) {
+                ele.fileListOne = fileObj[ele.id].filter(
+                  (x) => x.businessType == "0"
+                );
+                if (ele.fileListOne && ele.fileListOne.length > 0) {
+                  ele.imageUrl = ele.fileListOne[0].fileUrl;
+                }
+                ele.prodFileList = fileObj[ele.id]
+                  .filter((x) => x.businessType == "1")
+                  .map((x) => ({ ...x, name: x.fileName, url: x.fileUrl }));
+                if (ele.prodFileList && ele.prodFileList.length > 0) {
+                  ele.isShowProductFile = false;
+                } else {
+                  ele.isShowProductFile = true;
+                }
+              }
+            }
+          }
+        });
+    }
+  });
+};
 </script>
 <style scoped lang="scss">
 .app-container {

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

@@ -33,7 +33,7 @@
         <!-- 请款 -->
         <SendFunds ref="makeDom" v-else-if="flowForm.flowKey == 'account_request_funds_flow'" :queryData="queryData.data"></SendFunds>
 
-        <ReturnGood ref="makeDom" v-else-if="flowForm.flowKey == 'return_good_flow'" :queryData="queryData.data"></ReturnGood>
+        <ReturnGood ref="makeDom" v-else-if="flowForm.flowKey == 'purchase_back_flow'" :queryData="queryData.data"></ReturnGood>
         <!-- 取消到账认领 -->
         <!-- <CancelClaim ref="makeDom" v-else-if="flowForm.flowKey == 'claim_del_flow'" :queryData="queryData.data"></CancelClaim> -->
       </div>

+ 4 - 4
src/views/production/project/technology/index.vue

@@ -307,11 +307,11 @@ const formConfig = computed(() => {
       label: "批量模式",
       data: [
         {
-          dictKey: "0",
+          dictKey: 0,
           dictValue: "关闭批量模式",
         },
         {
-          dictKey: "1",
+          dictKey: 1,
           dictValue: "开启批量模式",
         },
       ],
@@ -328,7 +328,7 @@ const formConfig = computed(() => {
       data: taskData.value,
       itemWidth: 100,
       multiple: false,
-      isShow: formData.data.isBatchMode == "1",
+      isShow: formData.data.isBatchMode == 1,
     },
     // {
     //   type: "slot",
@@ -397,7 +397,7 @@ const openModal = () => {
   nodeObject.value = "";
   modalType.value = "add";
   formData.data = {
-    isBatchMode: "0",
+    isBatchMode: 0,
   };
   selectLine.value = [];
 };

+ 34 - 4
src/views/publicModule/codingRule/index.vue

@@ -3,6 +3,11 @@
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                @get-list="getList">
+        <template #priview="{item}">
+          <div style="width:100%">
+            {{item.ruleVoListStr}}
+          </div>
+        </template>
       </byTable>
     </div>
 
@@ -133,11 +138,17 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "最近操作人",
-        prop: "updateUserName",
-        width: 200,
+        label: "编码预览",
+        slot: "priview",
       },
     },
+    // {
+    //   attrs: {
+    //     label: "最近操作人",
+    //     prop: "updateUserName",
+    //     width: 200,
+    //   },
+    // },
     {
       attrs: {
         label: "操作时间",
@@ -174,7 +185,26 @@ const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   proxy.post("/codingRule/page", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
+    sourceList.value.data = res.rows.map((x) => {
+      let text = "";
+      if (x.ruleVoList && x.ruleVoList.length > 0) {
+        for (let i = 0; i < x.ruleVoList.length; i++) {
+          if (x.ruleVoList[i].ruleType === 5) {
+            for (let j = 0; j < x.ruleVoList[i].value; j++) {
+              if (j === x.ruleVoList[i].value - 1) {
+                text = text + "1";
+              } else {
+                text = text + "0";
+              }
+            }
+          } else {
+            text = text + x.ruleVoList[i].value;
+          }
+        }
+      }
+      x.ruleVoListStr = text;
+      return x;
+    });
     sourceList.value.pagination.total = res.total;
     setTimeout(() => {
       loading.value = false;

+ 47 - 40
src/views/purchaseManage/supplier/supplyPrice/index.vue

@@ -23,17 +23,17 @@
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #details>
           <div style="width: 100%">
-            <el-button type="primary" @click="openProduct = true" :disabled="modalType == 'edit'">
+            <el-button type="primary" @click="openProduct = true" v-if="modalType == 'add'" style="margin-bottom: 15px">
               选择
             </el-button>
 
-            <el-form ref="tableForm" :model="formData.data" :rules="rules" label-width="0px" style="margin-top: 15px">
+            <el-form ref="tableForm" :model="formData.data" :rules="rules" label-width="0px">
               <el-table :data="formData.data.supplierPriceList">
-                <el-table-column prop="customCode" label="货品编码" />
-                <el-table-column prop="name" label="货品名称" min-width="150" />
-                <el-table-column prop="spec" label="规格型号" />
-                <el-table-column prop="unit" label="单位" :formatter="(row) => dictKeyValue(row.unit, materialUnit)" />
-                <el-table-column prop="price" label="供应单价" min-width="150">
+                <el-table-column prop="customCode" label="物料编码" width="160" />
+                <el-table-column prop="name" label="物料名称" min-width="150" />
+                <!-- <el-table-column prop="spec" label="规格型号" /> -->
+                <el-table-column prop="unit" label="单位" :formatter="(row) => dictKeyValue(row.unit, materialUnit)" width="80" />
+                <el-table-column prop="price" label="供应单价" width="140">
                   <template #default="{ row, $index }">
                     <el-form-item :prop="'supplierPriceList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
                                   class="margin-b-0 wid100">
@@ -42,7 +42,7 @@
                   </template>
                 </el-table-column>
 
-                <el-table-column prop="zip" label="操作" width="100">
+                <el-table-column prop="zip" label="操作" width="60" v-if="modalType == 'add'">
                   <template #default="{ $index }">
                     <el-button type="primary" link @click="handleRemove($index)" :disabled="modalType == 'edit'">删除</el-button>
                   </template>
@@ -115,60 +115,64 @@ const selectConfig = computed(() => [
     prop: "supplierType",
     data: supplierType.value,
   },
-  {
-    label: "货品类型",
-    prop: "definition",
-    data: [
-      {
-        label: "产品",
-        value: "1",
-      },
-      {
-        label: "物料",
-        value: "2",
-      },
-    ],
-  },
+  // {
+  //   label: "物料类型",
+  //   prop: "definition",
+  //   data: [
+  //     {
+  //       label: "产品",
+  //       value: "1",
+  //     },
+  //     {
+  //       label: "物料",
+  //       value: "2",
+  //     },
+  //   ],
+  // },
 ]);
 const config = computed(() => {
   return [
-    {
-      attrs: {
-        label: "货品类型",
-        prop: "definition",
-      },
-      render(definition) {
-        return definition === 1 ? "产品" : definition === 2 ? "物料" : "";
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "物料类型",
+    //     prop: "definition",
+    //   },
+    //   render(definition) {
+    //     return definition === 1 ? "产品" : definition === 2 ? "物料" : "";
+    //   },
+    // },
     {
       attrs: {
         label: "所属分类",
         prop: "productClassifyName",
+        width: 150,
       },
     },
     {
       attrs: {
-        label: "货品编码",
+        label: "物料编码",
         prop: "productCode",
+        width: 160,
       },
     },
     {
       attrs: {
-        label: "货品名称",
+        label: "物料名称",
         prop: "productName",
+        "min-width": 200,
       },
     },
-    {
-      attrs: {
-        label: "规格型号",
-        prop: "productSpec",
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "规格型号",
+    //     prop: "productSpec",
+    //   },
+    // },
     {
       attrs: {
         label: "单位",
         prop: "productUnit",
+        width: 80,
       },
       render(unit) {
         return proxy.dictKeyValue(unit, materialUnit.value);
@@ -178,6 +182,7 @@ const config = computed(() => {
       attrs: {
         label: "供应商类型",
         prop: "supplierType",
+        width: 150,
       },
       render(type) {
         return proxy.dictKeyValue(type, supplierType.value);
@@ -187,18 +192,20 @@ const config = computed(() => {
       attrs: {
         label: "供应商名称",
         prop: "supplierName",
+        "min-width": 180,
       },
     },
     {
       attrs: {
         label: "供应单价",
         prop: "price",
+        width: 110,
       },
     },
     {
       attrs: {
         label: "操作",
-        width: "200",
+        width: "120",
         align: "right",
       },
       // 渲染 el-button,一般用在最后一列。

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

@@ -116,7 +116,7 @@ const typeList = ref([
     value: "3",
   },
   {
-    label: "补单超领",
+    label: "报损超领",
     value: "4",
   },
   {

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

@@ -96,7 +96,7 @@ const businessType = ref([
     value: "3",
   },
   {
-    label: "补单超领",
+    label: "报损超领",
     value: "4",
   },
   {