Преглед изворни кода

物流单确认收货逻辑调整,服务申请管理、服务申请新建调整

qymljy пре 4 месеци
родитељ
комит
412623f680

+ 54 - 20
src/HDrpManagement/logistics/details/index.vue

@@ -207,27 +207,61 @@
           });
         });
       },
-      onConfimRec () {
-        this.$confirm(this.$t(`确认收货吗?`), this.$t('提示'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: 'warning'
-        }).then(async () => {
-          const res = await this.$api.requested({
-            "id": "20221122133204",
-            "content": {
-              "sa_logisticsid":this.$route.query.id
-            }
-          })
-          this.tool.showMessage(res,()=>{
-            this.queryMainData()
-          })
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: this.$t('已取消')
+      onConfimRec (isContinue) {
+        if (isContinue == true || this.siteid != 'HY'){
+          this.$confirm(this.$t(`确认收货吗?`), this.$t('提示'), {
+            confirmButtonText: this.$t('确定'),
+            cancelButtonText: this.$t('取消'),
+            type: 'warning'
+          }).then(async () => {
+            const res = await this.$api.requested({
+              "id": "20221122133204",
+              "content": {
+                "sa_logisticsid":this.$route.query.id
+              }
+            })
+            this.tool.showMessage(res,()=>{
+              this.queryMainData()
+            })
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: this.$t('已取消')
+            });
           });
-        });
+        }else {
+          this.fileList()
+        }
+      },
+      async fileList(){
+        const res = await this.$api.requested({
+          "classname": "system.attachment.Attachment",
+          "method":"queryFileLink",
+          "content": {
+            "ownerid":this.$route.query.id,
+            "ownertable":"sa_logistics",
+            "usetype":""
+          }
+        })
+        if (res.code == 0){
+          this.tool.showMessage(res,()=>{})
+        }else {
+          if (res.total > 0){
+            this.onConfimRec(true)
+          }else {
+            this.$confirm('当前单据未上传纸质回签单附件,不可确认收货', '提示', {
+              showClose:false,
+              showCancelButton:false,
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+            }).then(() => {
+
+            }).catch(() => {
+
+            });
+          }
+        }
       },
       rowClick (row) {
         this.$refs['dismx'].listData(row.sa_orderid,row.sa_logistics_itemsid)

+ 5 - 1
src/HDrpManagement/serveBill/components/add.vue

@@ -227,7 +227,7 @@
       <div class="fixed__btn__panel">
         <el-button
           size="small"
-          @click="dialogFormVisible = false"
+          @click="onClose"
           class="normal-btn-width"
           >{{ $t("取 消") }}</el-button
         >
@@ -424,6 +424,10 @@ export default {
           this.form.sys_enterpriseid;
       }
     },
+    onClose(){
+      this.$refs["form"].resetFields();
+      this.dialogFormVisible = false;
+    }
   },
   async created() {
     this.getServeClass();

+ 2 - 1
src/HDrpManagement/serveBill/components/edit.vue

@@ -68,7 +68,7 @@
               v-if="form.servicetype == '售中' || form.servicetype == '售后'"
             >
               <el-form-item :label="$t(`订单号`)+':'" prop="sonum">
-                <selectOrder ref="order" @selectRow="orderChange">
+                <selectOrder ref="order" @selectRow="orderChange" :id="form.sys_enterpriseid">
                   <el-input
                     readonly
                     :disabled="!form.sys_enterpriseid"
@@ -369,6 +369,7 @@ export default {
         this.data.city,
         this.data.county,
       ];
+
     },
     onSubmit() {
       console.log(this.form);

+ 9 - 0
src/HDrpManagement/serveBill/components/selectOrder.vue

@@ -20,6 +20,11 @@
             prop="type"
             :label="$t(`订单类型`)">
           </el-table-column>
+          <el-table-column prop="projectname" :label="$t(`项目名称`)">
+            <template slot-scope="scope">
+              {{scope.row.projectname || '--'}}
+            </template>
+          </el-table-column>
           <el-table-column
             prop="tradefield"
             :label="$t(`领域`)">
@@ -35,6 +40,9 @@
           <el-table-column
             prop="saler_name"
             :label="$t('业务员')">
+            <template slot-scope="scope">
+              {{scope.row.saler_name || '--'}}
+            </template>
           </el-table-column>
           <el-table-column
             :label="$t('操作')"
@@ -87,6 +95,7 @@ export default {
   },
   methods:{
     async listData () {
+      console.log(this.id,'id的数据')
       this.param.content.sys_enterpriseid = this.id
       const res = await this.$api.requested(this.param)
       this.tableData = res.data

+ 5 - 1
src/HDrpManagement/serveBillMag/components/add.vue

@@ -224,7 +224,7 @@
       <div class="fixed__btn__panel">
         <el-button
           size="small"
-          @click="dialogFormVisible = false"
+          @click="onClose"
           class="normal-btn-width"
           >{{ $t("取 消") }}</el-button
         >
@@ -423,6 +423,10 @@ export default {
           this.form.sys_enterpriseid;
       }
     },
+    onClose(){
+      this.$refs["form"].resetFields();
+      this.dialogFormVisible = false;
+    }
   },
   async created() {
     this.getServeClass();

+ 1 - 1
src/HDrpManagement/serveBillMag/components/edit.vue

@@ -70,7 +70,7 @@
               v-if="form.servicetype == '售中' || form.servicetype == '售后'"
             >
               <el-form-item :label="$t(`订单号`) + ':'" prop="sonum">
-                <selectOrder ref="order" @selectRow="orderChange">
+                <selectOrder ref="order" @selectRow="orderChange" :id="form.sys_enterpriseid">
                   <el-input
                     readonly
                     :disabled="!form.sys_enterpriseid"

+ 9 - 1
src/HDrpManagement/serveBillMag/components/selectOrder.vue

@@ -25,15 +25,23 @@
           </el-table-column>
           <el-table-column prop="type" :label="$t(`订单类型`)">
           </el-table-column>
+          <el-table-column prop="projectname" :label="$t(`项目名称`)">
+            <template slot-scope="scope">
+              {{scope.row.projectname || '--'}}
+            </template>
+          </el-table-column>
           <el-table-column prop="tradefield" :label="$t(`领域`)">
           </el-table-column>
-          <el-table-column prop="toolcount" :label="$t(`合计数量`)">
+          <el-table-column prop="sumqty" :label="$t(`合计数量`)">
           </el-table-column>
           <el-table-column prop="sumamount" :label="$t(`合计金额`)">
           </el-table-column>
           <el-table-column prop="billdate" :label="$t(`单据时间`)">
           </el-table-column>
           <el-table-column prop="saler_name" :label="$t('业务员')">
+            <template slot-scope="scope">
+              {{scope.row.saler_name || '--'}}
+            </template>
           </el-table-column>
           <el-table-column :label="$t('操作')" width="90">
             <template slot-scope="scope">