浏览代码

发货单反审核填写原因

qymljy 4 周之前
父节点
当前提交
e6cf8b3dba
共有 2 个文件被更改,包括 44 次插入20 次删除
  1. 43 20
      src/HDrpManagement/dispatch/details/index.vue
  2. 1 0
      src/HDrpManagement/dispatch/modules/defaultInfo.vue

+ 43 - 20
src/HDrpManagement/dispatch/details/index.vue

@@ -163,28 +163,51 @@ import dialogTemplate from "@/components/dialogTemplate/index";
         this.$emit('onSuccess')
       },
       onCheck () {
-        this.$confirm(`${this.$t(`确定`)}${this.mainData.status === '审核'?this.$t('反审核'):this.$t('审核')}${this.$t(`该发货单`)}`, this.$t('提示'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: 'warning'
-        }).then(async () => {
-          const res = await this.$api.requested({
-            "id": this.mainData.status === '审核'?20221114135703:20221114135603,
-            "version":1,
-            "content": {
+        if (this.mainData.status == '审核'){
+          this.$prompt(this.$t('反审核原因'), this.$t('确定反审核该发货单吗?'), {
+            confirmButtonText: this.$t('确定'),
+            cancelButtonText: this.$t('取消'),
+          }).then(async ({ value }) => {
+            const res = await this.$api.requested({
+              "id": 20221114135703,
+              "content": {
+                "sa_dispatchid": this.$route.query.id,
+                "uncheckreason":value
+              },
+            })
+            this.tool.showMessage(res,()=>{
+              this.queryMainData()
+            })
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: this.$t('取消')
+            });
+          });
+        }else{
+          this.$confirm(`${this.$t(`确定`)}${this.mainData.status === '审核'?this.$t('反审核'):this.$t('审核')}${this.$t(`该发货单`)}`, this.$t('提示'), {
+            confirmButtonText: this.$t('确定'),
+            cancelButtonText: this.$t('取消'),
+            type: 'warning'
+          }).then(async () => {
+            const res = await this.$api.requested({
+              "id": this.mainData.status === '审核'?20221114135703:20221114135603,
+              "version":1,
+              "content": {
                 "sa_dispatchid":this.$route.query.id
-            }
-          })
-          this.tool.showMessage(res,()=>{
-            this.queryMainData()
-            this.$refs.product && this.$refs.product.listData()
-          })
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: this.$t('已取消')
+              }
+            })
+            this.tool.showMessage(res,()=>{
+              this.queryMainData()
+              this.$refs.product && this.$refs.product.listData()
+            })
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: this.$t('已取消')
+            });
           });
-        });
+        }
       },
       onReCheck() {
         this.$confirm(`${this.$t(`确定`)}${this.mainData.status === '复核'?this.$t('反复核'):this.$t('复核')}${this.$t(`该发货单`)}`, this.$t('提示'), {

+ 1 - 0
src/HDrpManagement/dispatch/modules/defaultInfo.vue

@@ -11,6 +11,7 @@
         <span :style="tool.getStatusColor(mainData.status)">{{ mainData.status?$t(mainData.status):"--" }}</span>
       </el-descriptions-item>
       <el-descriptions-item :label="$t('备注')">{{ mainData.remarks?mainData.remarks:"--" }}</el-descriptions-item>
+      <el-descriptions-item :label="$t('反审原因')">{{ mainData.uncheckreason?mainData.uncheckreason:"--" }}</el-descriptions-item>
     </el-descriptions>
     <el-descriptions class="normal-margin" :column="2"  border labelClassName="my-label" contentClassName="my-content">
       <div slot="title" class="my-label__title">{{$t(`收货信息`)}}</div>