zhangyuewww 2 سال پیش
والد
کامیت
fdfb436f27

+ 2 - 0
src/api/V2/houseSelfCollect/index.js

@@ -124,6 +124,8 @@ export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
 export const API_GET_BASEID ='/qualityInspectionManagement/selectBaseId'
 // 换任务号
 export const API_POST_TASK_NO = `/weighingManagement/api/changeTaskNo`
+// 换客户
+export const API_POST_CUSTOMER = `/weighingManagement/api/changeCustomer`
 // 丹东港生成入库单
 export const API_POST_DANDONG_ORDER = `/paymentManagement/api/generateOrder`
 // 检查客户送粮量

+ 3 - 0
src/model/houseSelfCollect/index.js

@@ -61,6 +61,7 @@ import {
   API_POST_SUBMIT,
   API_POST_CHANE_NO,
   API_POST_TASK_NO,
+  API_POST_CUSTOMER,
   API_POST_DANDONG_ORDER,
   API_POST_DELETE,
   API_GET_CONTRACT,
@@ -200,3 +201,5 @@ export const changeTaskNo = appRx.post(API_POST_TASK_NO, errorCatcher, errorHand
 export const dandongOrder = appRx.post(API_POST_DANDONG_ORDER, errorCatcher, errorHandle, filter)
 // 检查客户送粮量
 export const getquality = appRx.get(API_GETQUALITY, errorCatcher, errorHandle, filter)
+// 换客户
+export const changeCustomer = appRx.post(API_POST_CUSTOMER, errorCatcher, errorHandle, filter)

+ 3 - 2
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -452,7 +452,7 @@ export default {
       tpyeNo: '1',
       disabled: true,
       relationId: '',
-      // warehouseId: '',
+      warehouseId: '',
       purchasePriceList: [],
       isShowPrint: false,
       tableData: {},
@@ -997,7 +997,8 @@ export default {
         path: 'weightCheckRecord',
         query: {
           inWarehouseType: this.inWarehouseType,
-          warehouseName: this.warehouseName
+          warehouseName: this.warehouseName,
+          warehouseId: this.cangid
         }
       })
     },

+ 95 - 1
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -74,13 +74,14 @@
         <el-table-column key="11" prop="secretaryWeigher" label="司称员"></el-table-column>
         <el-table-column key="12" prop="grossDate" label="检斤时间"></el-table-column>
         <el-table-column key="13" prop="status" label="状态"></el-table-column>
-        <el-table-column key="14" label="操作" min-width="300">
+        <el-table-column key="14" label="操作" min-width="400">
           <template scope="scope">
             <!-- <el-button size="small" @click="print(scope.row)">打印</el-button> -->
             <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' || scope.row.status == '已称毛重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
             <el-button @click="backInfo(scope.row)" v-if="scope.row.status == '已称皮重'">退回</el-button>
             <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchange(scope.row)" v-if="scope.row.status == '已称毛重'">换仓</el-button>
             <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchangeNo(scope.row)" v-if="scope.row.status == '已称毛重'">换任务号</el-button>
+            <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchangeName(scope.row)" v-if="scope.row.status == '已称毛重' && warehousingType == 3">换客户</el-button>
             <el-button @click="deleteInfo(scope.row)" v-if="scope.row.status == '已称毛重'">删除</el-button>
           </template>
         </el-table-column>
@@ -192,6 +193,35 @@
             <el-button type="primary" @click="dialogVisibleconfirm1">确 定</el-button>
           </span>
         </el-dialog>
+        <el-dialog
+          title="提示"
+          :visible.sync="dialogVisible2"
+          width="30%"
+          :before-close="handleClose2">
+          <div style="text-align:center">
+            <el-form ref="form" label-width="110px">
+              <el-form-item label="客户名">
+             <el-select filterable clearable v-model="customerName" placeholder="请选择客户" class="typeselect"
+              @change="customerChange">
+              <el-option v-for="item in customerlist" :key="item.customerName" :label="item.customerName"
+                :value="item.customerName" />
+            </el-select>
+            </el-form-item>
+           <el-form-item label="手机号">
+            <el-input v-model="customerPhone" placeholder="手机号" :disabled="disabled" maxlength="15">
+            </el-input>
+             </el-form-item>
+             <el-form-item label="身份证号码">
+            <el-input v-model="customerNumberCard" placeholder="身份证号码" :disabled="disabled" maxlength="20">
+            </el-input>
+             </el-form-item>
+         </el-form>
+          </div>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="dialogVisible2 = false">取 消</el-button>
+            <el-button type="primary" @click="dialogVisibleconfirm2">确 定</el-button>
+          </span>
+        </el-dialog>
   </div>
 </template>
 <script>
@@ -202,6 +232,8 @@
     returnInfo,
     changeNo,
     changeTaskNo,
+    changeCustomer,
+    getcustomer,
     importWordYk,
     getweighingDelete
   } from '@/model/houseSelfCollect/index'
@@ -371,13 +403,18 @@
         endDate:'',
         dialogVisible:false,
         dialogVisible1:false,
+        dialogVisible2:false,
         binNumber:'',
         binnumberList:[],
         taskNolist:[],
+        customerlist:[],
         cangweiNum:'',
         contractNum:'',
         inOutTaskNo:'',
+        customerName:'',
         contractNo:'',
+        customerPhone:'',
+        customerNumberCard:'',
         positionId:'',
         warehouseInOutDetail:{},
       }
@@ -525,6 +562,7 @@
       this.compId = localStorage.getItem('ws-pf_compId')
       this.warehousingType = this.$route.query.inWarehouseType
       this.warehouseName = this.$route.query.warehouseName //仓库名
+      this.warehouseId = this.$route.query.warehouseId 
       this.getList()
     },
     methods: {
@@ -661,6 +699,15 @@
           }
         }
       },
+      customerChange(e){
+        this.customerName = e
+        for(let i = 0 ; i < this.customerlist.length ; i++){
+          if(this.customerName == this.customerlist[i].customerName){
+            this.customerPhone = this.customerlist[i].customerPhone
+            this.customerNumberCard = this.customerlist[i].customerNumberCard
+          }
+        }
+      },
       handleClose(){
         this.dialogVisible = false
       },
@@ -668,6 +715,12 @@
         this.inOutTaskNo=''
         this.dialogVisible1 = false
       },
+      handleClose2(){
+        this.customerName=''
+        this.customerPhone=''
+        this.customerNumberCard=''
+        this.dialogVisible2 = false
+      },
       dialogVisibleconfirm(){
         if(this.binNumber == this.cangweiNum){
           this.$message.error('已是该仓位无需修改')
@@ -720,6 +773,30 @@
           .catch(() => {
             return false
           })
+      },
+      dialogVisibleconfirm2(){
+        this.$confirm(`确定修改客户?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+              changeCustomer({id:this.id,customer:this.customerName,customerPhone:this.customerPhone,customerNumberCard:this.customerNumberCard}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '修改客户成功',
+                })
+                this.getList()
+                this.customerName=''
+                this.customerPhone=''
+                this.customerNumberCard=''
+                this.dialogVisible2=false
+						})
+          })
+          .catch(() => {
+            return false
+          })
       },
         exchange(row){
           for(let i = 0 ; i < this.warehouseList.length; i++ ){
@@ -751,6 +828,18 @@
             this.contractNum = row.contractNo
             this.dialogVisible1 = true
        },
+       exchangeName(row){
+           getcustomer({
+            warehouseId: this.warehouseId,
+            goodsName: row.goodsName
+          })
+          .toPromise()
+          .then((response) => {
+            this.customerlist = response
+          })
+            this.id = row.id
+            this.dialogVisible2 = true
+       },
        backInfo(row){
            this.$confirm('确定要退回该信息?', '提示', {
             confirmButtonText: '确定',
@@ -1049,6 +1138,11 @@
         }
       },
       warehouseNameChange() {
+        for(let i = 0 ; i < this.warehouseList.length; i++ ){
+            if(this.warehouseName == this.warehouseList[i].warehouseName){
+              		this.warehouseId = this.warehouseList[i].id
+            }
+          }
         this.getList()
       },
       handleSizeChange(val) {