瀏覽代碼

订单管理、订货业务、订货订单,海盐站点提交调整

qymljy 1 年之前
父節點
當前提交
c53653370f

+ 16 - 0
src/HDrpManagement/contractManage/modules/detail.vue

@@ -1055,6 +1055,10 @@ export default {
                     label:'付款条件',
                     value:this.mainData.paytype
                   },
+                  {
+                    label:'发货日期提醒(天)',
+                    value:this.mainData.reminddays
+                  },
                   {
                     label:'业务员',
                     value:this.mainData.salername
@@ -1163,6 +1167,10 @@ export default {
                     label:'付款条件',
                     value:this.mainData.paytype
                   },
+                  {
+                    label:'发货日期提醒(天)',
+                    value:this.mainData.reminddays
+                  },
                   {
                     label:'业务员',
                     value:this.mainData.salername
@@ -1276,6 +1284,10 @@ export default {
                     label:'付款条件',
                     value:this.mainData.paytype
                   },
+                  {
+                    label:'发货日期提醒(天)',
+                    value:this.mainData.reminddays
+                  },
                   {
                     label:'业务员',
                     value:this.mainData.salername
@@ -1380,6 +1392,10 @@ export default {
                         label:'付款条件',
                         value:this.mainData.paytype
                       },
+                      {
+                        label:'发货日期提醒(天)',
+                        value:this.mainData.reminddays
+                      },
                       {
                         label:'业务员',
                         value:this.mainData.salername

+ 1 - 1
src/HDrpManagement/dispatch/modules/productlist.vue

@@ -26,7 +26,7 @@
             <p v-else>{{$t(scope.column.data[scope.column.columnname])}}</p>
           </template>
           <template v-slot:opreation="scope">
-            <el-button type="text" size="mini" @click="deleteOrderProduct(scope.data)" :disabled="data.status === '审核' || data.status === '复核' || data.status === '关闭'">{{$t(`删 除`)}}</el-button>
+            <el-button type="text" size="mini" @click="deleteOrderProduct(scope.data)" :disabled="data.status !== '新建'">{{$t(`删 除`)}}</el-button>
           </template>
         </Table>
     <!-- <el-table

+ 39 - 29
src/HDrpManagement/orderManage/details/index.vue

@@ -135,6 +135,7 @@
         <el-button type="primary" @click="onRebanck" size="small">{{$t('确 定')}}</el-button>
       </span>
     </el-dialog>
+    <dialogTemplate ref="dialogRef" @daysSuccess="queryMainData" :data="mainData" ></dialogTemplate>
   </div>
 </template>
 
@@ -156,6 +157,7 @@ import erpHistory from './tabs/erpHistory.vue'
 import changeHistory from './tabs/changeHistory.vue'
 import importFile from './importFile.vue'
 import EditRemark from '../modules/EditRemark.vue'
+import dialogTemplate from "@/template/dialogTemplate/index";
 export default {
   name: "detail",
   data() {
@@ -165,6 +167,7 @@ export default {
       backreason:'',
       options:[],
       dialogVisible:false,
+      submitVisible:false,
       visible:false,
       value:'',
       selection:[],
@@ -173,7 +176,8 @@ export default {
       isusedrebate:'',
       checked:0,
       typeNew:'',
-      fullscreenLoading:false
+      fullscreenLoading:false,
+      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid
     }
   },
   provide () {
@@ -198,7 +202,8 @@ export default {
     erpHistory,
     changeHistory,
     importFile,
-    EditRemark
+    EditRemark,
+    dialogTemplate
   },
   methods:{
     async orderreviewtype () {
@@ -462,34 +467,39 @@ export default {
     },
     // 提交审核订单
     onSubmit (type) {
-      this.$confirm(`${this.$t(`是否`)} ${this.$t(type)} ${this.$t(`该订单`)}`, this.$t('提示'), {
-        confirmButtonText: this.$t('确定'),
-        cancelButtonText: this.$t('取消'),
-        type: 'warning'
-      }).then(async () => {
-        if (this.$refs.prod.time == null){
-          const res = await this.$api.requested({
-            "id": type === '审核'?20221108153502:20221108153402,
-            "content": {
-              "sa_orderid": this.mainData.sa_orderid,
-              "sys_enterpriseid": this.mainData.sys_enterpriseid,
-              "sa_accountclassid": this.mainData.accountclass.sa_accountclassid,
-              "reviewtype":type === '审核'?this.value:''
-            },
-          })
-          this.tool.showMessage(res,async ()=>{
-            this.visible = false
-            this.queryMainData()
-          })
-        }else {
-          this.typeNew = type
-        }
-      }).catch((err) => {
-        this.$message({
-          type: 'info',
-          message: this.$t('已取消')
+      if (this.siteid == 'HY' || this.siteid == 'YOSTEST1'){
+        this.$refs.dialogRef.dialogVisible = true
+        this.$refs.dialogRef.form.reminddays = this.mainData.reminddays
+      }else {
+        this.$confirm(`${this.$t(`是否`)} ${this.$t(type)} ${this.$t(`该订单`)}`, this.$t('提示'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: 'warning'
+        }).then(async () => {
+          if (this.$refs.prod.time == null){
+            const res = await this.$api.requested({
+              "id": type === '审核'?20221108153502:20221108153402,
+              "content": {
+                "sa_orderid": this.mainData.sa_orderid,
+                "sys_enterpriseid": this.mainData.sys_enterpriseid,
+                "sa_accountclassid": this.mainData.accountclass.sa_accountclassid,
+                "reviewtype":type === '审核'?this.value:''
+              },
+            })
+            this.tool.showMessage(res,async ()=>{
+              this.visible = false
+              this.queryMainData()
+            })
+          }else {
+            this.typeNew = type
+          }
+        }).catch((err) => {
+          this.$message({
+            type: 'info',
+            message: this.$t('已取消')
+          });
         });
-      });
+      }
     },
     // 反审核订单
     onReturnCheck () {

+ 19 - 11
src/SDrpManagement/agentOrder/details/index.vue

@@ -267,6 +267,7 @@
         }}</el-button>
       </span>
     </el-dialog>
+    <dialogTemplate ref="dialogRef" @daysSuccess="queryMainData" :data="mainData" ></dialogTemplate>
   </div>
 </template>
 
@@ -281,7 +282,7 @@ import dispatch from "./tabs/dispatch.vue";
 import invoiceTable from "./tabs/invoiceTable.vue";
 import revenue from "./tabs/revenueAndExp.vue";
 import importFile from "../modules/importFile.vue";
-
+import dialogTemplate from "@/template/dialogTemplate/index";
 export default {
   name: "detail",
   data() {
@@ -295,7 +296,8 @@ export default {
       checked: 0,
       rebateamount: "",
       typeNew:'',
-      selection:[]
+      selection:[],
+      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid
     };
   },
   provide() {
@@ -314,6 +316,7 @@ export default {
     invoiceTable,
     revenue,
     importFile,
+    dialogTemplate
   },
   methods: {
     async queryMainData(id) {
@@ -502,15 +505,19 @@ export default {
     },
     // 提交审核订单
     onSubmit(type) {
-      this.$confirm(
-        this.$t("是否") + `“${this.$t(type)}”` + this.$t("该订单"),
-        this.$t("提示"),
-        {
-          confirmButtonText: this.$t("确定"),
-          cancelButtonText: this.$t("取消"),
-          type: "warning",
-        }
-      )
+      if (this.siteid == 'HY' || this.siteid == 'YOSTEST1'){
+        this.$refs.dialogRef.dialogVisible = true
+        this.$refs.dialogRef.form.reminddays = this.mainData.reminddays
+      }else {
+        this.$confirm(
+            this.$t("是否") + `“${this.$t(type)}”` + this.$t("该订单"),
+            this.$t("提示"),
+            {
+              confirmButtonText: this.$t("确定"),
+              cancelButtonText: this.$t("取消"),
+              type: "warning",
+            }
+        )
         .then(async () => {
           if (this.$refs.prod.time == null){
             const res = await this.$api.requested({
@@ -535,6 +542,7 @@ export default {
             message: err,
           });
         });
+      }
     },
     // 查询站点是否使用返利金
     async queryUsedrebate() {

+ 2 - 2
src/SDrpManagement/agentOrder/modules/productlist.vue

@@ -275,10 +275,10 @@ export default {
               : this.$t("订单满")+`‘${this.tool.formatAmount(
                   this.freefreightamount,
                   2
-                )}’${$t('元免运费,当前还差')}‘${this.tool.formatAmount(
+                )}’${this.$t('元免运费,当前还差')}‘${this.tool.formatAmount(
                   this.freefreightamount - this.data.amount,
                   2
-                )}’${$t('元')}`;
+                )}’${this.$t('元')}`;
           break;
       }
       return result;

+ 39 - 32
src/SDrpManagement/salerOrder/details/index.vue

@@ -272,6 +272,7 @@
         }}</el-button>
       </span>
     </el-dialog>
+    <dialogTemplate ref="dialogRef" @daysSuccess="queryMainData" :data="mainData" ></dialogTemplate>
   </div>
 </template>
 
@@ -287,7 +288,7 @@ import invoiceTable from "./tabs/invoiceTable.vue";
 import revenue from "./tabs/revenueAndExp.vue";
 import importFile from "../modules/importFile.vue";
 import writeOff from "./tabs/writeoff.vue";
-
+import dialogTemplate from "@/template/dialogTemplate/index";
 export default {
   name: "detail",
   data() {
@@ -322,6 +323,7 @@ export default {
     revenue,
     importFile,
     writeOff,
+    dialogTemplate
   },
   methods: {
     async queryMainData(id) {
@@ -588,38 +590,43 @@ export default {
           message: this.$t("销售分类不能为空!"),
           type: "error",
         });
-      this.$confirm(
-        this.$t("是否") + `‘${this.$t(type)}’` + this.$t("该订单"),
-        this.$t("提示"),
-        {
-          confirmButtonText: this.$t("确定"),
-          cancelButtonText: this.$t("取消"),
-          type: "warning",
-        }
-      )
-        .then(async () => {
-          if (this.$refs.prod.time == null){
-            const res = await this.$api.requested({
-              id: type === "审核" ? 20221108153502 : 20221108153402,
-              content: {
-                sa_orderid: this.mainData.sa_orderid,
-                sys_enterpriseid: this.mainData.sys_enterpriseid,
-                sa_accountclassid: this.mainData.accountclass.sa_accountclassid,
-              },
-            });
-            this.tool.showMessage(res, async () => {
-              this.queryMainData();
+      if (siteid == 'HY' || siteid == 'YOSTEST1'){
+        this.$refs.dialogRef.dialogVisible = true
+        this.$refs.dialogRef.form.reminddays = this.mainData.reminddays
+      }else {
+        this.$confirm(
+            this.$t("是否") + `‘${this.$t(type)}’` + this.$t("该订单"),
+            this.$t("提示"),
+            {
+              confirmButtonText: this.$t("确定"),
+              cancelButtonText: this.$t("取消"),
+              type: "warning",
+            }
+        )
+            .then(async () => {
+              if (this.$refs.prod.time == null){
+                const res = await this.$api.requested({
+                  id: type === "审核" ? 20221108153502 : 20221108153402,
+                  content: {
+                    sa_orderid: this.mainData.sa_orderid,
+                    sys_enterpriseid: this.mainData.sys_enterpriseid,
+                    sa_accountclassid: this.mainData.accountclass.sa_accountclassid,
+                  },
+                });
+                this.tool.showMessage(res, async () => {
+                  this.queryMainData();
+                });
+              }else {
+                this.typeNew = type
+              }
+            })
+            .catch((err) => {
+              this.$message({
+                type: "info",
+                message: err,
+              });
             });
-          }else {
-            this.typeNew = type
-          }
-        })
-        .catch((err) => {
-          this.$message({
-            type: "info",
-            message: err,
-          });
-        });
+      }
     },
     // 反审核订单
     onReturnCheck() {

+ 138 - 0
src/template/dialogTemplate/index.vue

@@ -0,0 +1,138 @@
+<template>
+  <div>
+    <el-dialog append-to-body :title="$t(`提示`)" :visible.sync="dialogVisible" width="450px" style="font-size: 12px!important;">
+      <i class="el-icon-warning" style="color: #e6a23c"></i><span style="font-size: 12px">{{$t(`是否提交该订单`)}}</span>
+      <el-form
+          :model="form"
+          :rules="rules"
+          ref="form"
+          label-position="right"
+          :label-width="tool.onlyZh('110px')"
+          size="small"
+      >
+        <el-form-item :label="$t(`发货提醒天数`) + ':'" prop="reminddays" style="font-weight: bold;">
+          <el-input-number v-model="form.reminddays" controls-position="right" :min="0"></el-input-number>
+          <span style="font-weight: bold;font-size: 13px;margin-left: 10px">{{$t(`天`)}}</span>
+          <div style="margin-left: -100px;color: #999999;font-weight: normal;font-size: 12px">*{{$t(`用于在交期前提醒订单负责人待发货信息`)}}</div>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false" size="mini">{{$t('取 消')}}</el-button>
+        <el-button type="primary" @click="onSubmit" size="mini">{{$t('确 定')}}</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "index",
+  props:{
+    title:String,
+    data:Object,
+  },
+  data(){
+    var checkDays = (rule,value,callback) => {
+      if (isNaN(value)) {
+        return callback(new Error(this.$t("请填写数字")));
+      }
+      callback();
+    };
+    return {
+      dialogVisible:false,
+      form:{
+        reminddays:''
+      },
+      rules:{
+        reminddays: [
+          {
+            required: true,
+            message: this.$t("请设置发货日期提醒天数"),
+            trigger: "change",
+          },
+          {validator: checkDays,trigger: "change"}
+        ],
+      }
+    }
+  },
+  methods:{
+    onSubmit(){
+      this.$refs.form.validate(async (val) => {
+        if (!val) return false
+        if (val) {
+          const res = await this.$api.requested({
+            "id": 20221108153402,
+            "content": {
+              "sa_orderid": this.$route.query.id,
+              "sys_enterpriseid": this.data.sys_enterpriseid,
+              "sa_accountclassid": this.data.accountclass.sa_accountclassid,
+              "reviewtype":''
+            },
+          })
+          if (res.code == 0){
+            this.tool.showMessage(res,()=>{})
+          }else {
+            const res1 = await this.$api.requested({
+              "id": 2024121110312502,
+              "content": {
+                "sa_orderid": this.$route.query.id,
+                "reminddays": this.form.reminddays
+              },
+            })
+            if (res1.code == 0){
+              this.tool.showMessage(res1,()=>{})
+            }else {
+              this.tool.showMessage(res1,()=>{
+                this.dialogVisible = false
+                this.$emit('daysSuccess')
+              })
+            }
+          }
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+  /deep/ .el-dialog__title {
+    line-height: 24px;
+    font-size: 16px;
+    color: #303133;
+  }
+  /deep/ .el-dialog__header {
+    padding: 10px 10px;
+    padding-bottom: 10px;
+  }
+  /deep/ .el-dialog__footer {
+    padding: 10px;
+    padding-top: 10px;
+    text-align: right;
+    box-sizing: border-box;
+  }
+  /deep/ .el-dialog__headerbtn {
+    position: absolute;
+    top: 10px;
+    right: 10px;
+    padding: 0;
+    background: 0 0;
+    border: none;
+    outline: 0;
+    cursor: pointer;
+    font-size: 16px;
+  }
+  /deep/ .el-dialog__body {
+    padding: 0px 10px !important;
+  }
+  /deep/ .el-form-item__label {
+    text-align: right;
+    vertical-align: middle;
+    float: left;
+    font-size: 13px;
+    color: #606266;
+    line-height: 40px;
+    padding: 0 12px 0 0;
+    box-sizing: border-box;
+  }
+</style>