Răsfoiți Sursa

开单和开预订单

shish 2 ani în urmă
părinte
comite
82b52b20a6

+ 10 - 3
ghs/src/service/ghs/index.js

@@ -12,10 +12,17 @@ export class CustomService extends BaseService {
 
 	downloadGhs(data) {
 		return this.request({
-		  url: '/download-ghs',
-		  params: data
+			url: '/download-ghs',
+			params: data
 		});
-	  }
+	}
+
+	changeLocation(data) {
+		return this.request({
+			url: '/change-location',
+			params: data
+		});
+	}
 
 }
 export default new CustomService();

+ 11 - 2
ghs/src/views/in/add.vue

@@ -17,8 +17,8 @@
 			</template>
 
 			<template #table-column-location="{scope}">
-				<span v-if="scope.row.location == 1">本地</span>
-				<span v-else style="color:blue;font-weight:bold;">上游</span>
+				<span v-if="scope.row.location == 1" style="cursor: pointer;" @click="modifyLocation(scope.row)">本地</span>
+				<span v-else style="color:blue;font-weight:bold;cursor: pointer;" @click="modifyLocation(scope.row)">上游</span>
 			</template>
 
 			<template #table-column-buyAmount="{scope}">
@@ -80,6 +80,15 @@ export default {
 	},
 	methods: {
 		...mapActions(['getLevel']),
+		modifyLocation(info){
+			let that = this
+			that.$confirm('确认修改类型?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
+				that.$service.ghs.changeLocation({id:info.id}).then(res => {
+					that.$message.success('修改成功')
+					that.app.refresh({ type: that.tabIndex,name:that.name })
+				})
+			})
+		},
 		changeText(){
 			this.app.refresh({ type: this.tabIndex,name:this.name })
 		},

+ 11 - 2
ghs/src/views/in/ghs.vue

@@ -13,8 +13,8 @@
 			</template>
 
 			<template #table-column-location="{scope}">
-				<span v-if="scope.row.location == 1">本地</span>
-				<span v-else style="color:blue;font-weight:bold;">上游</span>
+				<span v-if="scope.row.location == 1" style="cursor: pointer;" @click="modifyLocation(scope.row)">本地</span>
+				<span v-else style="color:blue;font-weight:bold;cursor: pointer;" @click="modifyLocation(scope.row)">上游</span>
 			</template>
 
 			<template #table-column-avatar="{scope}">
@@ -157,6 +157,15 @@ export default {
 	},
 	methods: {
 		...mapActions(['getLevel']),
+		modifyLocation(info){
+			let that = this
+			that.$confirm('确认修改类型?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
+				that.$service.ghs.changeLocation({id:info.id}).then(res => {
+					that.$message.success('修改成功')
+					that.app.refresh({ type: that.tabIndex,name:that.name })
+				})
+			})
+		},
 		resetAddGhs(){
 			this.addGhsPop = false
 			this.location = 0

+ 5 - 1
ghs/src/views/order/confirm.vue

@@ -638,7 +638,11 @@ export default {
       this.searchOldVal = this.searchVal;
       this.desk = 'searchList';
       let hasExists = []
-      await this.$service.item.getItemList({search:this.searchVal,requestType:'kd',pageSize:20}).then(res=>{
+      let requestType = 'kd'
+      if(this.form.book == 1){
+        requestType = 'book'
+      }
+      await this.$service.item.getItemList({search:this.searchVal,requestType:requestType,pageSize:20}).then(res=>{
         let list = this.$util.copyObject(res.list)
         if(!that.$util.isEmpty(list)){
           list = list.sort(this.sorts_fun('classId'))

+ 10 - 8
ghsApp/src/pagesPurchase/supplier.vue

@@ -126,14 +126,16 @@ export default {
   methods: {
     changeLocation(ghs){
       let that = this
-      changeLocationFn({id:ghs.id}).then(res=>{
-        if(res.code == 1){
-          this.$msg('修改成功')
-          setTimeout(() => {
-            that.resetList()
-            that.getGhsList()            
-          }, 1000);
-        }
+      this.$util.confirmModal({content:'确认修改?'},() => {
+        changeLocationFn({id:ghs.id}).then(res=>{
+          if(res.code == 1){
+            this.$msg('修改成功')
+            setTimeout(() => {
+              that.resetList()
+              that.getGhsList()            
+            }, 1000);
+          }
+        })
       })
     },
     modifyConfirm(val){