Bläddra i källkod

订单管理、订货业务调整变更驳回

qymljy 4 veckor sedan
förälder
incheckning
cd541519fa

+ 54 - 10
src/HDrpManagement/orderManage/details/index.vue

@@ -54,7 +54,7 @@
             </template>
             <template #footerBtn>
               <el-button @click="$refs.orderChangeRef.dialogTableVisible = false" size="small" style="width: 100px">{{$t(`取消`)}}</el-button>
-              <el-button type="primary" @click="changeSubmit('驳回')" size="small" plain style="width: 100px;background: #FFFFFF">{{$t(`驳回变更`)}}</el-button>
+              <el-button type="primary" @click="orderChangeLog = true" size="small" plain style="width: 100px;background: #FFFFFF;color: #3874f6">{{$t(`驳回变更`)}}</el-button>
               <el-button type="primary" @click="changeSubmit('确认')" size="small" style="width: 100px">{{$t(`确认变更`)}}</el-button>
             </template>
           </orderChange>
@@ -172,6 +172,24 @@
       </span>
     </el-dialog>
     <dialogTemplate ref="dialogRef" @daysSuccess="queryMainData" :data="mainData" ></dialogTemplate>
+    <el-dialog append-to-body :title="$t(`驳回变更申请`)" :visible.sync="orderChangeLog" width="400px" @close="closeChange">
+      <el-form
+          ref="form"
+          :model="form"
+          :rules="rules"
+          label-position="top"
+          :label-width="tool.onlyZh('90px')"
+          size="small"
+      >
+        <el-form-item :label="$t(`原因说明`)" prop="reject_reason">
+          <el-input v-model="form.reject_reason" type="textarea" :placeholder="$t(`请输入退回原因`)"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="orderChangeLog = false" size="small">{{$t('取 消')}}</el-button>
+        <el-button type="primary" @click="changeSubmit('驳回')" size="small">{{$t('确 定')}}</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -196,6 +214,7 @@ import EditRemark from '../modules/EditRemark.vue'
 import dialogTemplate from "@/template/dialogTemplate/index";
 import setMaterial from "./tabs/setMaterial";
 import orderChange from "@/components/dialogTemplate/index3"
+import dialogOrder from "@/components/dialogTemplate/index1"
 export default {
   name: "detail",
   data() {
@@ -234,7 +253,14 @@ export default {
       tablecols:[],
       total:0,
       currentPage:0,
-      tagChange:false
+      tagChange:false,
+      orderChangeLog:false,
+      form:{
+        reject_reason:''
+      },
+      rules:{
+        reject_reason:[{required: true, message: this.$t("输入驳回原因"), trigger: "blur"}]
+      }
     }
   },
   provide () {
@@ -262,7 +288,8 @@ export default {
     EditRemark,
     dialogTemplate,
     setMaterial,
-    orderChange
+    orderChange,
+    dialogOrder
   },
   methods:{
     async orderreviewtype () {
@@ -327,7 +354,8 @@ export default {
       let param = {
         id:'',
         content:{
-          sa_orderid:this.$route.query.id
+          sa_orderid:this.$route.query.id,
+          reject_reason:''
         },
       }
       if (type == '驳回'){
@@ -335,12 +363,25 @@ export default {
       }else {
         param.id = 2026033114555002
       }
-      const res = await this.$api.requested(param)
-      this.tool.showMessage(res,()=>{
-        this.$refs.orderChangeRef.dialogTableVisible = false
-        this.queryMainData()
-        this.$refs.details.$refs.tag.queryTag()
-      })
+      if (type == '驳回'){
+        param.content.reject_reason = this.form.reject_reason
+        this.$refs["form"].validate(async (valid) => {
+          if (!valid) return false;
+          const res = await this.$api.requested(param)
+          this.tool.showMessage(res,()=>{
+            this.$refs.orderChangeRef.dialogTableVisible = false
+            this.queryMainData()
+            this.$refs.details.$refs.tag.queryTag()
+          })
+        })
+      }else {
+        const res = await this.$api.requested(param)
+        this.tool.showMessage(res,()=>{
+          this.$refs.orderChangeRef.dialogTableVisible = false
+          this.queryMainData()
+          this.$refs.details.$refs.tag.queryTag()
+        })
+      }
     },
     changeDataStructure() {
       let that = this
@@ -1274,6 +1315,9 @@ export default {
       this.param.content.pageNumber = val
       this.changeListData()
     },
+    closeChange(){
+      this.form.reject_reason = ''
+    }
   },
   mounted () {
     this.queryMainData(this.$route.query.id)

+ 1 - 0
src/HDrpManagement/orderManage/details/tabs/defaultInfo.vue

@@ -31,6 +31,7 @@
       <el-descriptions-item :label="$t(`提交时间`)">{{ mainData.submitdate?mainData.submitdate:"--" }}</el-descriptions-item>
       <el-descriptions-item :label="$t(`审核人`)">{{ mainData.checkby?mainData.checkby:"--" }}</el-descriptions-item>
       <el-descriptions-item :label="$t(`审核时间`)">{{ mainData.checkdate?mainData.checkdate:"--" }}</el-descriptions-item>
+      <el-descriptions-item :label="$t(`变更申请驳回原因`)" v-if="tool.checkAuth($route.name,'orderChangeCheck')">{{ mainData.reject_reason?mainData.reject_reason:"--" }}</el-descriptions-item>
     </el-descriptions>
 <!--    <el-descriptions  border :column="2" labelClassName="my-label" contentClassName="my-content">
       <div slot="title" class="my-label__title">物流信息</div>

+ 2 - 0
src/SDrpManagement/salerOrder/details/tabs/defaultInfo.vue

@@ -97,6 +97,8 @@
       <el-descriptions-item :label="$t(`审核时间`)">{{
         mainData.checkdate ? mainData.checkdate : "--"
       }}</el-descriptions-item>
+      <el-descriptions-item :label="$t(`变更申请驳回原因`)" v-if="tool.checkAuth($route.name,'orderChangeCheck')">
+        {{ mainData.reject_reason?mainData.reject_reason:"--" }}</el-descriptions-item>
     </el-descriptions>
     <!--    <el-descriptions  border :column="2" labelClassName="my-label" contentClassName="my-content">
       <div slot="title" class="my-label__title">物流信息</div>