linwenxin преди 1 година
родител
ревизия
a4c2357097

+ 6 - 6
package-lock.json

@@ -4415,9 +4415,9 @@
       },
       "dependencies": {
         "@babel/parser": {
-          "version": "7.23.5",
-          "resolved": "http://121.41.110.30:4873/@babel%2fparser/-/parser-7.23.5.tgz",
-          "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ=="
+          "version": "7.23.6",
+          "resolved": "http://121.41.110.30:4873/@babel%2fparser/-/parser-7.23.6.tgz",
+          "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ=="
         },
         "postcss": {
           "version": "8.4.32",
@@ -4711,9 +4711,9 @@
       "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
     },
     "@zjlib/element-plugins": {
-      "version": "2.10.18",
-      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.10.18.tgz",
-      "integrity": "sha512-CQdgeTh58Mu7Lv5qJmMaV5QZMA3FOgBWw5tmp96fNFAirHpete38AM+280MPSwPyYaBRbAJo6Yxah7owUf4Diw==",
+      "version": "2.11.0",
+      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.11.0.tgz",
+      "integrity": "sha512-/WFCEM2W17djRzAWNw7NxAysmFZx3I7aiCIv9HK46oZRgnNEkuJ2PX0LKuIhJj2kHCKsstl+ddNjrI3/t5ZVyg==",
       "requires": {
         "@turf/turf": "^6.5.0",
         "@vuemap/vue-amap": "^0.1.12",

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
     "@turf/turf": "^6.5.0",
     "@vue-office/excel": "^1.3.0",
     "@vue/composition-api": "^1.7.1",
-    "@zjlib/element-plugins": "^2.10.18",
+    "@zjlib/element-plugins": "^2.11.0",
     "@zjlib/element-ui2": "^1.0.3",
     "axios": "0.18.1",
     "chatgpt": "^4.1.2",

+ 26 - 13
src/views/auxiliaryFittings/purchasingManagement/components/inStorage.vue

@@ -16,6 +16,7 @@
         <div slot="footer" class="dialog-footer">
           <el-button size="mini" @click="formCancel">取 消</el-button>
           <el-button size="mini" @click="formConfirm" type="primary">确 定</el-button>
+          <el-button size="mini" @click="passExamination" type="primary">审核通过</el-button>
         </div>
       </el-dialog>
     </div>
@@ -60,24 +61,25 @@ export default {
     operation(h, { row, index, column }) {
       return (
         <div class='operation-btns'>
+          {row.flag=="SAVE" ? <el-button type="text" onClick={() => {
+            this.getDetail(row.purchaseId, 1)
+          }}>编辑</el-button> : null}
+          {row.flag=="SAVE" ? <el-button type="text" onClick={() => {
+            this.getDetail(row.purchaseId, 3)
+          }}>审核</el-button> : null}
           <el-button type="text" onClick={() => {
-            Object.assign(this.formData, row)
-            this.formDialogType = 1
-            this.openForm()
-          }}>编辑</el-button>
-          <el-button type="text" onClick={() => {
-            Object.assign(this.formData, row)
-            this.formDialogType = 2
-            this.openForm()
+            this.getDetail(row.purchaseId, 2)
           }}>详情</el-button>
-          <el-button type="text" onClick={() => {
-            Object.assign(this.formData, row)
-            this.formDialogType = 3
-            this.openForm()
-          }}>审核</el-button>
         </div>
       )
     },
+    getDetail(purchaseId, type) {
+      websitPurchaseInDetail({ purchaseId }).then(res => {
+        Object.assign(this.formData, res.data)
+        this.formDialogType = type
+        this.openForm()
+      })
+    },
     formConfirm() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
@@ -88,6 +90,17 @@ export default {
           })
         }
       })
+    },
+    passExamination() {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          websitPurchaseInConfirm({ purchaseId: this.formData.purchaseId, flag: "OK" }).then(res => {
+            this.$message({ type: 'success', message: `审核通过!` })
+            this.formCancel()
+            this.$refs.pageRef.refreshList()
+          })
+        }
+      })
     }
   }
 }

+ 26 - 13
src/views/auxiliaryFittings/purchasingManagement/components/retStorage.vue

@@ -16,6 +16,7 @@
         <div slot="footer" class="dialog-footer">
           <el-button size="mini" @click="formCancel">取 消</el-button>
           <el-button size="mini" @click="formConfirm" type="primary">确 定</el-button>
+          <el-button size="mini" @click="passExamination" type="primary">审核通过</el-button>
         </div>
       </el-dialog>
     </div>
@@ -60,24 +61,25 @@ export default {
     operation(h, { row, index, column }) {
       return (
         <div class='operation-btns'>
+          {row.flag=="SAVE" ? <el-button type="text" onClick={() => {
+            this.getDetail(row.purchaseRetId, 1)
+          }}>编辑</el-button> : null}
+          {row.flag=="SAVE" ? <el-button type="text" onClick={() => {
+            this.getDetail(row.purchaseRetId, 3)
+          }}>审核</el-button> : null}
           <el-button type="text" onClick={() => {
-            Object.assign(this.formData, row)
-            this.formDialogType = 1
-            this.openForm()
-          }}>编辑</el-button>
-          <el-button type="text" onClick={() => {
-            Object.assign(this.formData, row)
-            this.formDialogType = 2
-            this.openForm()
+            this.getDetail(row.purchaseRetId, 2)
           }}>详情</el-button>
-          <el-button type="text" onClick={() => {
-            Object.assign(this.formData, row)
-            this.formDialogType = 3
-            this.openForm()
-          }}>审核</el-button>
         </div>
       )
     },
+    getDetail(purchaseRetId, type) {
+      websitPurchaseRetDetail({ purchaseRetId }).then(res => {
+        Object.assign(this.formData, res.data)
+        this.formDialogType = type
+        this.openForm()
+      })
+    },
     formConfirm() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
@@ -88,6 +90,17 @@ export default {
           })
         }
       })
+    },
+    passExamination() {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          websitPurchaseRetConfirm({ purchaseRetId: this.formData.purchaseRetId, flag: "OK" }).then(res => {
+            this.$message({ type: 'success', message: `审核通过!` })
+            this.formCancel()
+            this.$refs.pageRef.refreshList()
+          })
+        }
+      })
     }
   }
 }

+ 4 - 4
src/views/auxiliaryFittings/purchasingManagement/mixins/form_tpl.js

@@ -355,21 +355,21 @@ export default {
               <div>
                 <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }}>
                   <el-descriptions-item label="单据状态">
-                    11111
+                    {({ SAVE: "保存", OK: "通过", FAIL: "失败" })[this.formData.flag]}
                   </el-descriptions-item>
                   <el-descriptions-item label="单据编号">
                     11111
                   </el-descriptions-item>
                   <el-descriptions-item label="所属商户" contentStyle={{ width: '42%' }}>
-                    11111
+                    {this.formData.companyWechatId}
                   </el-descriptions-item>
                 </el-descriptions>
                 <el-descriptions border title="" column={2} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '42%' }} style="margin-top:-1px">
                   <el-descriptions-item label="网点名称">
-                    11111
+                    {this.formData.websitId}
                   </el-descriptions-item>
                   <el-descriptions-item label="供应商名称">
-                    11111
+                    {this.formData.venderId}
                   </el-descriptions-item>
                 </el-descriptions>
                 {