瀏覽代碼

Merge branch 'orangeUrgent' into allTestUrgent

qymljy 5 月之前
父節點
當前提交
b7bbe147d8

+ 31 - 20
src/HDrpManagement/orderManage/details/index.vue

@@ -15,12 +15,15 @@
         @onTabClick="onTabClick"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
+        <div slot="customOperationBef">
+          <setMaterial v-if="tool.checkAuth($route.name,'setMaterial')" @setSuccess="queryMainData"></setMaterial>
+        </div>
         <div slot="customOperation"  v-if="Object.keys(mainData).length > 0">
           <!-- <Edit class="inline-16" v-if="tool.checkAuth($route.name,'update') && (mainData.status == '新建')" :data="mainData" @onSuccess="queryMainData();$refs.prod && $refs.prod.listData()" /> -->
           <Edit style="display: inline-block !important;"   v-if="mainData.status === '新建'" :data="mainData" @onSuccess="queryMainData();$refs.prod && $refs.prod.listData()" />
 <!--          <Edit class="inline-16" v-if="mainData.status !== '新建' && mainData.status !== '关闭'" :data="mainData" @onSuccess="queryMainData();$refs.prod && $refs.prod.listData()" />-->
           <EditRemark style="margin-right: 20px !important;" v-if="mainData.status === '新建'" :data="mainData" @onSuccess="queryMainData"></EditRemark>
-          <EditRemark style="margin-right: 20px !important;margin-left: -10px" v-if="mainData.status !== '新建' && tool.checkAuth($route.name,'editRemark')" :data="mainData" @onSuccess="queryMainData"></EditRemark>
+          <EditRemark style="margin-right: 20px !important;margin-left: -2px" v-if="mainData.status !== '新建' && tool.checkAuth($route.name,'editRemark')" :data="mainData" @onSuccess="queryMainData"></EditRemark>
           <changeSaler class="inline-16" style="margin-left: -10px" ref="saler" @selectRow="salerChange" :isPlain="true">
             <el-button v-if="tool.checkAuth($route.name,'changeSaler')" type="primary" slot="input" size="mini" @click="$refs.saler.visible=true;$refs.saler.listData()">{{$t(`变更业务员`)}}</el-button>
           </changeSaler>
@@ -160,6 +163,7 @@ import changeHistory from './tabs/changeHistory.vue'
 import importFile from './importFile.vue'
 import EditRemark from '../modules/EditRemark.vue'
 import dialogTemplate from "@/template/dialogTemplate/index";
+import setMaterial from "./tabs/setMaterial";
 export default {
   name: "detail",
   data() {
@@ -208,7 +212,8 @@ export default {
     changeHistory,
     importFile,
     EditRemark,
-    dialogTemplate
+    dialogTemplate,
+    setMaterial
   },
   methods:{
     async orderreviewtype () {
@@ -570,25 +575,10 @@ export default {
           cancelButtonText: this.$t('取消'),
           type: 'warning'
         }).then(async () => {
+          console.log(this.tabNow,'tabNow',this.$refs.prod.time)
           if (this.tabNow != 'tab0' || 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.queryMainData()
-              // if (type == '审核' && (this.siteid == 'HY' || this.siteid == 'YOSTEST1')){
-              //   this.querySetDay()
-              // }else {
-              //   this.visible = false
-              //   this.queryMainData()
-              // }
-            })
+            console.log('2222222222222222222222')
+            this.onSubmitRe(type)
           }else {
             this.typeNew = type
           }
@@ -600,6 +590,27 @@ export default {
         });
       }
     },
+    async onSubmitRe(type){
+      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:'',
+          "isCheckMaterial":type === '审核'?this.tool.checkAuth(this.$route.name,'setMaterial'):''
+        },
+      })
+      this.tool.showMessage(res,async ()=>{
+        this.queryMainData()
+        // if (type == '审核' && (this.siteid == 'HY' || this.siteid == 'YOSTEST1')){
+        //   this.querySetDay()
+        // }else {
+        //   this.visible = false
+        //   this.queryMainData()
+        // }
+      })
+    },
     // 反审核订单
     onReturnCheck () {
       this.$confirm(this.$t(`是否反审核该订单`), this.$t('提示'), {

+ 86 - 0
src/HDrpManagement/orderManage/details/tabs/setMaterial.vue

@@ -0,0 +1,86 @@
+<template>
+  <dialogTemplate ref="dialogRef" btn-title="设置材质" btn-type="primary" dialog-title="设置材质" @onSubmit="onSubmit">
+    <template #formRule>
+      <el-form
+          ref="form"
+          :model="form"
+          :rules="rules"
+          label-position="right"
+          :label-width="tool.onlyZh('100px')"
+          size="mini"
+      >
+        <el-form-item :label="$t('材质') + ':'" prop="material">
+          <el-select
+              v-model="form.material"
+              :placeholder="$t('请选择材质')"
+              @focus="queryType('itemmaterial')"
+              style="width: 80%"
+          >
+            <el-option
+                v-for="item in options.itemmaterial"
+                :key="item.value"
+                :label="$t(item.value)"
+                :value="item.value"
+            >
+              <span style="float: left">{{ $t(item.value) }}</span>
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+    </template>
+  </dialogTemplate>
+</template>
+
+<script>
+import dialogTemplate from "@/components/dialogTemplate/index2";
+export default {
+  name: "setMaterial",
+  components:{dialogTemplate},
+  data(){
+    return {
+      options:{
+        itemmaterial:[]
+      },
+      form:{
+        material:''
+      },
+      rules:{
+        material: [
+          {
+            required: true,
+            message: this.$t("请选择材质"),
+            trigger: "change",
+          },
+        ],
+      }
+    }
+  },
+  methods:{
+    onSubmit(){
+      this.$refs.form.validate(async (valid)=>{
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "content": {
+            "sa_orderid": this.$route.query.id,
+            "material": this.form.material
+          },
+          "id": 2025111013214902,
+        })
+        this.tool.showMessage(res,()=>{
+          this.$refs.dialogRef.dialogTableVisible = false
+          this.$emit('setSuccess')
+        })
+      })
+    },
+    /*获取分类*/
+    async queryType(val){
+      const res = await this.$store.dispatch("optiontypeselect", val)
+      this.options[val] = res.data
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 43 - 0
src/components/dialogTemplate/index2.vue

@@ -0,0 +1,43 @@
+<template>
+  <div>
+    <el-button :type="disabled?'':btnType" size="mini" :disabled="disabled"  @click="dialogShow">{{$t(btnTitle)}}</el-button>
+    <el-dialog :title="dialogTitle?$t(dialogTitle):$t(`提示`)" :visible.sync="dialogTableVisible" append-to-body :show-close="false" width="600px">
+      <slot name="formRule"></slot>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="onCancel" size="small">{{$t(`取 消`)}}</el-button>
+        <el-button type="primary" @click="onSubmit" size="small">{{$t(`确 定`)}}</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "index1",
+  props:["btnTitle","disabled","btnType","content",'dialogTitle'],
+  data(){
+    return {
+      dialogTableVisible:false,
+    }
+  },
+  methods:{
+    dialogShow(){
+      this.dialogTableVisible = true
+    },
+    onCancel(){
+      this.dialogTableVisible = false
+      this.$emit('onCancel')
+    },
+    onSubmit(){
+      this.$emit('onSubmit')
+    }
+  }
+
+}
+</script>
+
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding: 0 20px 20px 20px !important;
+  }
+</style>