Selaa lähdekoodia

部分新需求

cz 1 vuosi sitten
vanhempi
commit
d5849ff883

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

@@ -420,7 +420,7 @@ export default defineComponent({
       if (props.loading) return;
       let str = "";
       if (props.pagination.keyword) {
-        str = props.pagination.keywordt.rim();
+        str = props.pagination.keyword.trim();
       }
       proxy.$emit(
         "getList",

+ 8 - 8
src/components/process/SF/Purchase.vue

@@ -249,22 +249,22 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="备注">
+            <el-table-column :label="'金额'" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'purchaseProjectList.' + $index + '.remark'" class="margin-b-0 wid100">
-                    <el-input v-model="row.remark" placeholder="请输入备注" />
+                  <el-form-item :prop="'purchaseProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="totalAmount()" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column :label="'金额'" width="130">
+            <el-table-column label="备注">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'purchaseProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true"
-                                class="margin-b-0 wid100">
-                    <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
-                                     :controls="false" :min="0" @change="totalAmount()" />
+                  <el-form-item :prop="'purchaseProjectList.' + $index + '.remark'" class="margin-b-0 wid100">
+                    <el-input v-model="row.remark" placeholder="请输入备注" />
                   </el-form-item>
                 </div>
               </template>

+ 8 - 8
src/components/process/SF/PurchaseChange.vue

@@ -249,22 +249,22 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="备注">
+            <el-table-column :label="'金额'" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'purchaseProjectList.' + $index + '.remark'" class="margin-b-0 wid100">
-                    <el-input v-model="row.remark" placeholder="请输入备注" />
+                  <el-form-item :prop="'purchaseProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="totalAmount()" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column :label="'金额'" width="130">
+            <el-table-column label="备注">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'purchaseProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true"
-                                class="margin-b-0 wid100">
-                    <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
-                                     :controls="false" :min="0" @change="totalAmount()" />
+                  <el-form-item :prop="'purchaseProjectList.' + $index + '.remark'" class="margin-b-0 wid100">
+                    <el-input v-model="row.remark" placeholder="请输入备注" />
                   </el-form-item>
                 </div>
               </template>

+ 1 - 1
src/components/process/SF/Subscribe.vue

@@ -9,7 +9,7 @@
           </el-button>
           <el-table :data="formData.data.subscribeDetailList" style="width: 100%; ">
             <el-table-column prop="productCode" label="物料编码" width="130" />
-            <el-table-column prop="productName" label="商品名称" min-width="130" />
+            <el-table-column prop="productName" label="物料名称" min-width="130" />
             <el-table-column label="尺寸 cm*cm*cm" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">

+ 68 - 6
src/views/MES/supplementaryOrder/index.vue

@@ -11,6 +11,26 @@
             <img v-if="item.fileUrl" :src="item.fileUrl" class="pic" @click="openImg(item.fileUrl)" />
           </div>
         </template>
+        <template #quantity="{item}">
+          <div style="width: 100%;color:red">
+            {{item.quantity}}
+          </div>
+        </template>
+
+        <template #type="{item}">
+          <div style="width: 100%;">
+            <span :class="item.type==1?'tag-2':'tag-1'"> {{dictValueLabel(item.type,statusData)}}</span>
+          </div>
+        </template>
+
+        <template #picList="{item}">
+          <div style="width: 100%">
+            <div v-if="item.fileListOne && item.fileListOne.length>0">
+              <img v-for="pic in item.fileListOne" :key="pic.fileUrl" :src="pic.fileUrl" class="pic" @click="openImg(pic.fileUrl)"
+                   style="margin-right:10px" />
+            </div>
+          </div>
+        </template>
 
       </byTable>
     </div>
@@ -40,9 +60,7 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     keyword: "",
-    produceStatus: "",
-    staDeliveryPeriod: "",
-    endDeliveryPeriod: "",
+    type: "",
     beginTime: "",
     endTime: "",
   },
@@ -66,6 +84,14 @@ const selectConfig = computed(() => [
     prop: "type",
     data: statusData.value,
   },
+  {
+    type: "time",
+    label: "报损时间",
+    placeholder: "开始日期",
+    prop: "beginTime",
+    placeholderOne: "结束日期",
+    propOne: "endTime",
+  },
 ]);
 const config = computed(() => {
   return [
@@ -73,11 +99,12 @@ const config = computed(() => {
       attrs: {
         label: "报损类型",
         prop: "type",
+        slot: "type",
         width: 100,
       },
-      render(val) {
-        return proxy.dictValueLabel(val, statusData.value);
-      },
+      // render(val) {
+      //   return proxy.dictValueLabel(val, statusData.value);
+      // },
     },
     {
       attrs: {
@@ -126,6 +153,7 @@ const config = computed(() => {
       attrs: {
         label: "数量",
         prop: "quantity",
+        slot: "quantity",
         width: 100,
       },
     },
@@ -136,6 +164,14 @@ const config = computed(() => {
         "min-width": 200,
       },
     },
+    {
+      attrs: {
+        label: "照片上传",
+        slot: "picList",
+        align: "left",
+        width: 160,
+      },
+    },
 
     // {
     //   attrs: {
@@ -229,6 +265,19 @@ const getList = async (req) => {
           filePathAtt: "fileUrl",
         });
       }
+
+      const idList = res.rows.map((x) => x.id);
+      // 请求文件数据并回显
+      if (productIdList.length > 0) {
+        proxy.getFileData({
+          businessIdList: idList,
+          data: sourceList.value.data,
+          att: "id",
+          // businessType: "0",
+          fileAtt: "fileListOne",
+          filePathAtt: "fileUrlaa",
+        });
+      }
     });
 };
 
@@ -280,4 +329,17 @@ getList();
 .content {
   padding: 20px;
 }
+
+.tag-1 {
+  background: red;
+  color: #fff;
+  border-radius: 2px;
+  padding: 4px;
+}
+.tag-2 {
+  background: rgb(239 227 51);
+  color: #fff;
+  border-radius: 2px;
+  padding: 4px;
+}
 </style>

+ 3 - 3
src/views/publicModule/companyConfig/index.vue

@@ -175,9 +175,9 @@ let modalType = ref("add");
 let rules = ref({
   name: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
   countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
-  countryEnStr: [
-    { required: true, message: "请输入国家 (英文)", trigger: "blur" },
-  ],
+  // countryEnStr: [
+  //   { required: true, message: "请输入国家 (英文)", trigger: "blur" },
+  // ],
 });
 const { proxy } = getCurrentInstance();
 const contactInformationType = ref([]);

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

@@ -35,13 +35,13 @@
         </template>
 
         <template #purchaseCount="{item}">
-          <div style="width:100%;font-weight:700">
+          <div style="width:100%;font-weight:700;color:#409EFF">
             {{item.purchaseCount}}
           </div>
         </template>
 
         <template #count="{item}">
-          <div style="width:100%;font-weight:700">
+          <div style="width:100%;font-weight:700;color:#409EFF">
             {{item.count}}
           </div>
         </template>
@@ -255,8 +255,8 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "生产需求量",
-        prop: "count",
+        label: "需求量",
+        prop: "prodNeedCount",
         width: 100,
       },
     },
@@ -545,6 +545,7 @@ const start = () => {
 const startOne = () => {
   if (selectData.value.length > 0) {
     let rowId = selectData.value[0].subcribeId;
+    let rowCompanyId = selectData.value[0].companyId;
     proxy
       .post("/subscribeDetail/page", {
         pageNum: 1,
@@ -554,7 +555,7 @@ const startOne = () => {
       .then((res) => {
         let data = res.rows;
         let ids = data
-          .filter((x) => x.subcribeId == rowId)
+          .filter((x) => x.subcribeId == rowId && x.companyId == rowCompanyId)
           .map((y) => y.id)
           .join();
         proxy.$router.replace({

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

@@ -280,7 +280,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "备注",
-        prop: "remark",
+        prop: "remarks",
         "min-width": 200,
       },
     },

+ 60 - 4
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -22,7 +22,7 @@
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #details>
           <div style="width: 100%">
-            <el-button type="primary" @click="openProduct = true">添加明细</el-button>
+            <el-button type="primary" @click="openProduct = true" :disabled="['100','103'].includes(formData.data.type)">添加明细</el-button>
             <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
               <el-table-column label="图片" width="70" align="center">
                 <template #default="{ row, $index }">
@@ -48,12 +48,12 @@
                   <div style="width: 100%">
                     <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
                       <el-input-number v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0" :controls="false" :min="1"
-                                       onmousewheel="return false;" />
+                                       onmousewheel="return false;" :disabled="['100','103'].includes(formData.data.type)" />
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column align="center" label="操作" width="80" fixed="right">
+              <el-table-column align="center" label="操作" width="80" fixed="right" v-if="!['100','103'].includes(formData.data.type)">
                 <template #default="{ row, $index }">
                   <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
                 </template>
@@ -247,7 +247,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "备注",
-        prop: "remark",
+        prop: "remarks",
         "min-width": 200,
       },
     },
@@ -314,6 +314,7 @@ const getDict = () => {
     })
     .then((res) => {
       lendDataOne.value = res.rows.map((x) => ({
+        ...x,
         label:
           // x.code +
           // " " +
@@ -390,6 +391,7 @@ const formConfig = computed(() => {
       required: true,
       data: inBoundReason.value,
       fn: (val) => {
+        formData.data.list = [];
         if (["101", "102", "108", "109"].includes(val)) {
           formData.data.borrowId = "";
           formData.data.loseId = "";
@@ -420,6 +422,34 @@ const formConfig = computed(() => {
       filterable: true,
       itemWidth: 50,
       isShow: formData.data.type == "100",
+      fn: (val) => {
+        if (val) {
+          proxy.post("/stockJournal/detail", { id: val }).then((res) => {
+            if (res.list && res.list.length < 1) {
+              return;
+            }
+            let ids = res.list.map((x) => x.productId);
+            formData.data.list = res.list.map((x) => ({
+              fileUrl: "",
+              productCode: x.productCode,
+              productId: x.productId,
+              productName: x.productName,
+              productLength: x.productLength,
+              productWidth: x.productWidth,
+              productHeight: x.productHeight,
+              quantity: x.quantity,
+            }));
+            proxy.getFileData({
+              businessIdList: ids,
+              data: formData.data.list,
+              att: "productId",
+              businessType: "0",
+              fileAtt: "fileList",
+              filePathAtt: "fileUrl",
+            });
+          });
+        }
+      },
     },
     {
       type: "select",
@@ -429,6 +459,32 @@ const formConfig = computed(() => {
       filterable: true,
       itemWidth: 50,
       isShow: formData.data.type == "103",
+      fn: (val) => {
+        const current = lendDataOne.value.find((x) => x.value == val);
+        if (current && current.materialId) {
+          let ids = [current.materialId];
+          formData.data.list = [
+            {
+              fileUrl: "",
+              productCode: current.materialCode,
+              productId: current.materialId,
+              productName: current.materialName,
+              productLength: current.materialLength,
+              productWidth: current.materialWidth,
+              productHeight: current.materialHeight,
+              quantity: current.quantity,
+            },
+          ];
+          proxy.getFileData({
+            businessIdList: ids,
+            data: formData.data.list,
+            att: "productId",
+            businessType: "0",
+            fileAtt: "fileList",
+            filePathAtt: "fileUrl",
+          });
+        }
+      },
     },
     {
       type: "input",