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

+ 15 - 7
src/components/byTable/index.vue

@@ -185,6 +185,10 @@ export default defineComponent({
       type: Boolean,
       default: false,
     },
+    isCustomResetFn: {
+      type: Boolean,
+      default: false,
+    },
     hideAll: {
       type: Boolean,
       default: false,
@@ -470,13 +474,17 @@ export default defineComponent({
 
     const searchReset = () => {
       // total 取最大值是为了防止分页组件total值为0的时候会触发一次current-change事件
-      proxy.$emit(
-        "getList",
-        Object.assign(props.filterParams, {
-          ...paginationCopy,
-          total: Math.max(...Array.from(paginationTotalData)),
-        })
-      );
+      if (props.isCustomResetFn) {
+        proxy.$emit("searchReset");
+      } else {
+        proxy.$emit(
+          "getList",
+          Object.assign(props.filterParams, {
+            ...paginationCopy,
+            total: Math.max(...Array.from(paginationTotalData)),
+          })
+        );
+      }
     };
 
     const handlePageChange = (val) => {

+ 17 - 0
src/components/process/SF/Contract.vue

@@ -721,6 +721,22 @@ const formConfig = computed(() => {
       },
     },
     {
+      type: "select",
+      prop: "aaass",
+      label: "订单处理方式",
+      data: [
+        {
+          dictKey: "1",
+          dictValue: "业务自采",
+        },
+        {
+          dictKey: "0",
+          dictValue: "生产处理",
+        },
+      ],
+      itemWidth: 25,
+    },
+    {
       type: "treeSelect",
       prop: "companyId",
       label: "工厂",
@@ -1215,6 +1231,7 @@ const rules = ref({
   contractType: [
     { required: true, message: "请选择订单类型", trigger: "change" },
   ],
+  aaass: [{ required: true, message: "请选择订单处理方式", trigger: "change" }],
   deliveryTime: [
     { required: true, message: "请选择交货日期", trigger: "change" },
   ],

+ 0 - 1
src/components/process/SF/DiscussPrice.vue

@@ -543,7 +543,6 @@ const getRawMaterialData = () => {
     //   value: x.id,
     // }));
     rawMaterialData.value = res.rows.map((x) => ({
-      ...x,
       label: x.name + "," + x.customCode,
       value: x.id,
     }));

+ 0 - 1
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -1284,7 +1284,6 @@ const getRawMaterialData = () => {
     //   value: x.id,
     // }));
     rawMaterialData.value = res.rows.map((x) => ({
-      ...x,
       label: x.name + "," + x.customCode,
       value: x.id,
     }));

+ 0 - 1
src/views/EHSD/productLibrary/waitCreateProduct/index.vue

@@ -1076,7 +1076,6 @@ const getRawMaterialData = () => {
     //   value: x.id,
     // }));
     rawMaterialData.value = res.rows.map((x) => ({
-      ...x,
       label: x.name + "," + x.customCode,
       value: x.id,
     }));

+ 0 - 1
src/views/EHSD/saleContract/PriceSheetDetail.vue

@@ -625,7 +625,6 @@ const getRawMaterialData = () => {
     //   value: x.id,
     // }));
     rawMaterialData.value = res.rows.map((x) => ({
-      ...x,
       label: x.name + "," + x.customCode,
       value: x.id,
     }));

+ 23 - 12
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -37,6 +37,12 @@
               {{ dictValueLabel(item.produceStatus, produceStatusData) }}</span>
           </div>
         </template>
+        <template #statusSlot="{ item }">
+          <div style="width: 100%">
+            <span :class="(item.status==88 || item.status==99)?'red':''">
+              {{ dictValueLabel(item.status, status) }}</span>
+          </div>
+        </template>
 
         <template #amount="{ item }">
           <div>
@@ -600,6 +606,16 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "审批状态",
+        slot: "statusSlot",
+        width: 100,
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, status.value);
+      },
+    },
+    {
+      attrs: {
         label: "生产状态",
         // prop: "produceStatus",
         slot: "produceStatus",
@@ -817,17 +833,6 @@ const config = computed(() => {
 
     {
       attrs: {
-        label: "审批状态",
-        prop: "status",
-        width: 100,
-      },
-      render(type) {
-        return proxy.dictValueLabel(type, status.value);
-      },
-    },
-
-    {
-      attrs: {
         label: "操作",
         width: 200,
         align: "center",
@@ -849,7 +854,7 @@ const config = computed(() => {
                 },
               }
             : {},
-          row.status == 30 && row.orderDistributeStatus == 1
+          row.produceStatus == 1
             ? {
                 attrs: {
                   label: "终止生产",
@@ -1911,4 +1916,10 @@ const submitTermination = () => {
   cursor: pointer;
   pointer-events: none;
 }
+.red {
+  background: red;
+  border-radius: 2px;
+  padding: 4px;
+  color: #fff;
+}
 </style>

+ 0 - 1
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -1451,7 +1451,6 @@ const getRawMaterialData = () => {
     //   value: x.id,
     // }));
     rawMaterialData.value = res.rows.map((x) => ({
-      ...x,
       label: x.name + "," + x.customCode,
       value: x.id,
     }));

+ 1 - 9
src/views/EHSD/saleContract/priceSheetEstimate/index.vue

@@ -1122,15 +1122,7 @@ const technologyData = ref([]);
 const getRawMaterialData = () => {
   proxy.post("/productInfo/page", { productClassifyId: 110 }).then((res) => {
     rawMaterialData.value = res.rows.map((x) => ({
-      ...x,
-      label:
-        x.name +
-        "," +
-        x.customCode +
-        "," +
-        `${x["length"]}*${x.width}*${x.height}(cm)` +
-        "," +
-        x.color,
+      label: x.name + "," + x.customCode,
       value: x.id,
     }));
   });

+ 62 - 19
src/views/MES/productionTask/index.vue

@@ -9,7 +9,7 @@
                 text: '打印',
                 action: () => openModal('add'),
                 disabled: selectIds.length==0,
-              }]" @get-list="handleSearch">
+              }]" :isCustomResetFn="true" @get-list="handleSearch" @search-reset="searchReset">
     </byTable>
 
     <div style="background:#fff">
@@ -18,7 +18,7 @@
           <template #label>
             <div style="display:flex;align-items:center">
               <div>在手任务</div>
-              <div class="badge" v-if="taskCountObj['onHandCount']">{{taskCountObj['onHandCount'] || 0}}</div>
+              <div class="badge" v-if="Number(taskCountObj['onHandCount'])">{{taskCountObj['onHandCount'] || 0}}</div>
             </div>
           </template>
         </el-tab-pane>
@@ -26,7 +26,7 @@
           <template #label>
             <div style="display:flex;align-items:center">
               <div>已完成</div>
-              <div class="badge" v-if="taskCountObj['completedCount']">{{taskCountObj['completedCount'] || 0}}</div>
+              <div class="badge" v-if="Number(taskCountObj['completedCount'])">{{taskCountObj['completedCount'] || 0}}</div>
             </div>
           </template>
 
@@ -35,7 +35,7 @@
           <template #label>
             <div style="display:flex;align-items:center">
               <div>所有任务</div>
-              <div class="badge" v-if="taskCountObj['allCount']">{{taskCountObj['allCount'] || 0}}</div>
+              <div class="badge" v-if="Number(taskCountObj['allCount'])">{{taskCountObj['allCount'] || 0}}</div>
             </div>
           </template>
         </el-tab-pane>
@@ -43,7 +43,7 @@
           <template #label>
             <div style="display:flex;align-items:center">
               <div>车间工序结存</div>
-              <div class="badge" v-if="taskCountObj['balanceCount']">{{taskCountObj['balanceCount'] || 0}}</div>
+              <div class="badge" v-if="Number(taskCountObj['balanceCount'])">{{taskCountObj['balanceCount'] || 0}}</div>
             </div>
           </template>
 
@@ -124,8 +124,9 @@
 
         <template #produceStatus="{item}">
           <div style="width: 100%">
-            <span class="red" v-if="item.produceStatus=='99'"> 作废 </span>
-            <span v-else> {{dictValueLabel(item.produceStatus, statusData)}} </span>
+            <span :class="{
+              'red':item.produceStatus=='88' || item.produceStatus=='99'
+            }"> {{dictValueLabel(item.produceStatus, statusData)}} </span>
           </div>
         </template>
 
@@ -575,13 +576,18 @@ const contractTag = computed(
   () => proxy.useUserStore().allDict["contract_prod_tag"]
 );
 const pageActiveName = ref("1");
+const lastPageActiveName = ref("");
 const handlePageTabChange = (val) => {
-  selectIds.value = [];
-  if (val == "1") {
-    sourceList.value.pagination.isScheduling = "0";
-  } else {
+  if (lastPageActiveName.value == "2") {
+    sourceList.value.pagination.produceStatus = "";
+  }
+  if (lastPageActiveName.value == "1") {
+    sourceList.value.pagination.isScheduling = "";
+  }
+  if (val != "1") {
     sourceList.value.pagination.isScheduling = "";
   }
+  selectIds.value = [];
   switch (val) {
     case "1":
       break;
@@ -592,13 +598,14 @@ const handlePageTabChange = (val) => {
     case "4":
       break;
     default:
-      getTableList();
-      getTaskCount();
       break;
   }
+  getTableList();
   if (["1", "2", "3", "4"].includes(val)) {
     getList();
+  } else {
   }
+  lastPageActiveName.value = val;
 };
 const companyData = ref([]);
 const loading = ref(false);
@@ -616,7 +623,7 @@ const sourceList = ref({
     beginTime: "",
     endTime: "",
     isOverdue: "",
-    isScheduling: "0",
+    isScheduling: "",
     schedulingDate: "",
   },
 });
@@ -733,6 +740,7 @@ const selectConfig = computed(() => [
     propOne: "",
     fn: () => {
       getTableList();
+      getTaskCount();
     },
   },
 ]);
@@ -979,11 +987,11 @@ const sourceListOne = ref({
     schedulingDate: "",
   },
 });
-sourceListOne.value.pagination.schedulingDate = moment().format(
-  "yyyy-MM-DD HH:mm:ss"
-);
-sourceList.value.pagination.schedulingDate =
-  sourceListOne.value.pagination.schedulingDate;
+// sourceListOne.value.pagination.schedulingDate = moment().format(
+//   "yyyy-MM-DD HH:mm:ss"
+// );
+// sourceList.value.pagination.schedulingDate =
+//   sourceListOne.value.pagination.schedulingDate;
 
 const selectConfigOne = computed(() => [
   {
@@ -1153,6 +1161,10 @@ const getTableList = (req) => {
   //   ...sourceListOne.value.pagination,
   //   ...req,
   // };
+  if (pageActiveName.value == "1") {
+    sourceList.value.pagination.isScheduling = "0";
+  }
+
   if (pageActiveName.value == "2") {
     sourceList.value.pagination.produceStatus = "2,5,10";
   }
@@ -1171,6 +1183,10 @@ const getTableList = (req) => {
 
 const taskCountObj = ref({});
 const getTaskCount = (req) => {
+  if (pageActiveName.value == "1") {
+    sourceList.value.pagination.isScheduling = "0";
+  }
+
   if (pageActiveName.value == "2") {
     sourceList.value.pagination.produceStatus = "2,5,10";
   }
@@ -1184,6 +1200,10 @@ getTaskCount();
 
 const getList = async () => {
   // sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  if (pageActiveName.value == "1") {
+    sourceList.value.pagination.isScheduling = "0";
+  }
+
   if (pageActiveName.value == "2") {
     sourceList.value.pagination.produceStatus = "2,5,10";
   }
@@ -1272,6 +1292,29 @@ const handleSearch = (req) => {
   getTaskCount();
 };
 
+const searchReset = () => {
+  sourceList.value.pagination = {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    produceStatus: "",
+    staDeliveryPeriod: "",
+    endDeliveryPeriod: "",
+    beginTime: "",
+    endTime: "",
+    isOverdue: "",
+    isScheduling: "",
+    schedulingDate: "",
+  };
+  if (pageActiveName.value == "1") {
+    sourceList.value.pagination.isScheduling = "0";
+  } else if (pageActiveName.value == "2") {
+    sourceList.value.pagination.produceStatus = "2,5,10";
+  }
+  handleSearch(sourceList.value.pagination);
+};
+
 const printList = ref([]);
 
 const selectIds = ref([]);

+ 7 - 7
src/views/finance/fundManage/flow/index.vue

@@ -357,13 +357,13 @@ const selectConfig = computed(() => {
 });
 const config = computed(() => {
   return [
-    {
-      attrs: {
-        label: "业务公司",
-        prop: "companyName",
-        width: 110,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "业务公司",
+    //     prop: "companyName",
+    //     width: 110,
+    //   },
+    // },
     {
       attrs: {
         label: "关联销售订单",

+ 23 - 0
src/views/product/material/index.vue

@@ -572,6 +572,17 @@ const formConfig = computed(() => {
       isShow: isSpecial.value,
     },
     {
+      type: "select",
+      prop: "rawMaterialId",
+      label: "关联原材料(无属性)",
+      itemWidth: 50,
+      data: rawMaterialData.value,
+      filterable: true,
+      disabled: false,
+      fn: (val) => {},
+      isShow: !isSpecial.value && isShowLabel.value,
+    },
+    {
       type: "uploadImg",
       // limit: 1,
       // listType: "picture-card",
@@ -938,6 +949,18 @@ const associationConfig = computed(() => {
     },
   ];
 });
+
+const rawMaterialData = ref([]);
+const getRawMaterialData = () => {
+  proxy.post("/productInfo/page", { productClassifyId: 110 }).then((res) => {
+    rawMaterialData.value = res.rows.map((x) => ({
+      label: x.name + "," + x.customCode,
+      value: x.id,
+    }));
+  });
+};
+getRawMaterialData();
+
 const associationData = ref({
   data: [],
   pagination: {

+ 21 - 10
src/views/salesMange/saleContract/claim/index.vue

@@ -14,7 +14,7 @@
       </template>
     </byTable>
 
-    <el-dialog title="认领" v-if="dialogVisible" v-model="dialogVisible" width="50%" v-loading="loading">
+    <el-dialog title="认领" v-if="dialogVisible" v-model="dialogVisible" width="60%" v-loading="loading">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #detail>
           <div style="width: 100%;padding:0 15px">
@@ -27,25 +27,29 @@
                 </template>
               </el-table-column>
               <el-table-column prop="sumContractNotClaimMoney" label="未结清金额" width="100" />
-              <el-table-column prop="money" label="关联金额" min-width="150">
+              <el-table-column prop="money" label="关联金额" width="150">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="'claimContractList.' + $index + '.money'" :rules="rules.money" :inline-message="true">
-                    <el-input-number v-model="row.money" :precision="2" :controls="false" :min="0" onmousewheel="return false;" />
+                  <el-form-item :prop="'claimContractList.' + $index + '.money'" :rules="rules.money" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number v-model="row.money" :precision="2" :controls="false" :min="0" onmousewheel="return false;"
+                                     @change="(val)=>handleMoneyChange($index,val)" />
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column prop="claimType" label="到账类型" min-width="150">
+              <el-table-column prop="claimType" label="到账类型" width="150">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="'claimContractList.' + $index + '.claimType'" :rules="rules.claimType" :inline-message="true">
+                  <el-form-item :prop="'claimContractList.' + $index + '.claimType'" :rules="rules.claimType" :inline-message="true"
+                                class="margin-b-0 wid100">
                     <el-select v-model="row.claimType" style="width: 100%">
                       <el-option v-for="item in claimTypeList" :key="item.value" :label="item.label" :value="item.value" />
                     </el-select>
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column prop="contractMoney" label="换算金额" min-width="150">
+              <el-table-column prop="contractMoney" label="换算金额" width="150">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="'claimContractList.' + $index + '.contractMoney'" :rules="rules.contractMoney" :inline-message="true">
+                  <el-form-item :prop="'claimContractList.' + $index + '.contractMoney'" :rules="rules.contractMoney" :inline-message="true"
+                                class="margin-b-0 wid100">
                     <el-input-number v-model="row.contractMoney" :precision="2" :controls="false" :min="0" onmousewheel="return false;" />
                   </el-form-item>
                 </template>
@@ -215,7 +219,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: "100",
+        width: "140",
         align: "center",
         fixed: "right",
       },
@@ -484,6 +488,13 @@ const handleRemove = (index) => {
     type: "success",
   });
 };
+
+const handleMoneyChange = (index, val) => {
+  if (formData.data.currency == "CNY") {
+    formData.data.claimContractList[index].contractMoney = val;
+  }
+};
+
 const handleSelectContrct = (row) => {
   const flag = formData.data.claimContractList.some(
     (x) => x.contractId === row.id
@@ -497,7 +508,7 @@ const handleSelectContrct = (row) => {
     dataType: row.dataType,
     contractId: row.id,
     contractCode: row.code,
-    money: 0,
+    money: null,
     currency: row.currency,
     rate: rowRate.value,
     claimType: "",