shish 2 лет назад
Родитель
Сommit
bc868ff3b9
3 измененных файлов с 35 добавлено и 25 удалено
  1. 3 1
      ghs/src/cool/request/index.js
  2. 6 0
      ghs/src/service/ghs/index.js
  3. 26 24
      ghs/src/views/in/add.vue

+ 3 - 1
ghs/src/cool/request/index.js

@@ -35,6 +35,7 @@ import product from '@/service/product/index';
 import ptItemClass from '@/service/pt-item-class/index';
 import ptItemClass from '@/service/pt-item-class/index';
 import ghsItemClass from '@/service/ghs-item-class/index';
 import ghsItemClass from '@/service/ghs-item-class/index';
 import statBook from '@/service/stat-book/index';
 import statBook from '@/service/stat-book/index';
+import ghs from '@/service/ghs/index';
 
 
 export function SET_SERVICE({ store }) {
 export function SET_SERVICE({ store }) {
 	// const files = require.context('@/service/', true, /\.js$/);
 	// const files = require.context('@/service/', true, /\.js$/);
@@ -75,7 +76,8 @@ export function SET_SERVICE({ store }) {
 		product,
 		product,
 		ptItemClass,
 		ptItemClass,
 		ghsItemClass,
 		ghsItemClass,
-		statBook
+		statBook,
+		ghs
 	};
 	};
 
 
 	Vue.prototype.$service = modules;
 	Vue.prototype.$service = modules;

+ 6 - 0
ghs/src/service/ghs/index.js

@@ -0,0 +1,6 @@
+import { BaseService, Service } from '@/cool';
+@Service('ghs')
+export class CustomService extends BaseService {
+
+}
+export default new CustomService();

+ 26 - 24
ghs/src/views/in/add.vue

@@ -1,15 +1,15 @@
 <template>
 <template>
-  <div v-if="form.customId == 0" style="text-align:center;margin-top:30px;">
+  <div v-if="form.ghsId == 0" style="text-align:center;margin-top:30px;">
     <span style="font-size:20px;">搜索供货商:</span>
     <span style="font-size:20px;">搜索供货商:</span>
-    <el-select @change="selectCustomFn" v-model="selectCustomName" filterable remote reserve-keyword placeholder="搜索供货商,光标插入 Ctrl + C" clearable ref="customref"
-				:remote-method="searchCustomInfo" :loading="loading" style="width:400px;margin-left:20px;" size="big">
+    <el-select @change="selectGhsFn" v-model="selectGhsName" filterable remote reserve-keyword placeholder="搜索供货商,光标插入 Ctrl + C" clearable ref="customref"
+				:remote-method="selectGhsInfo" :loading="loading" style="width:400px;margin-left:20px;" size="big">
     				<el-option v-for="item in customInfoList" :key="item.id" :label="`${item.name}`" :value="item"></el-option>
     				<el-option v-for="item in customInfoList" :key="item.id" :label="`${item.name}`" :value="item"></el-option>
   				</el-select>
   				</el-select>
   </div>
   </div>
   <div class="app-list-content" v-else>
   <div class="app-list-content" v-else>
     <div class="left_box">
     <div class="left_box">
       <p class="tor">
       <p class="tor">
-        <span style="font-weight:bold;color:black;">客户:{{form.customName}}</span>
+        <span style="font-weight:bold;color:black;">供货商:{{form.ghsName}}</span>
         <span>全屏:F11</span>
         <span>全屏:F11</span>
         <span>提交:F9</span>
         <span>提交:F9</span>
         <span>修改:回车</span>
         <span>修改:回车</span>
@@ -111,8 +111,8 @@
     <el-dialog title="确认提交" v-if="showCommitPop" :visible.sync="showCommitPop" width="655px" center :close-on-click-modal="false">
     <el-dialog title="确认提交" v-if="showCommitPop" :visible.sync="showCommitPop" width="655px" center :close-on-click-modal="false">
       <div>
       <div>
         <div class="accounts-list">
         <div class="accounts-list">
-          客户
-          <div class="accounts-center">{{form.customName}}</div>
+          供货商
+          <div class="accounts-center">{{form.ghsName}}</div>
         </div>
         </div>
 
 
         <div class="accounts-list" v-if="currentShop.pfLevel && currentShop.pfLevel == 1">
         <div class="accounts-list" v-if="currentShop.pfLevel && currentShop.pfLevel == 1">
@@ -245,8 +245,8 @@ export default {
         sendDate: "",
         sendDate: "",
         sendTimeWant: "",
         sendTimeWant: "",
         sendCost: "",
         sendCost: "",
-        customId: "",
-        customName:'',
+        ghsId: "",
+        ghsName:'',
         packCost:"",
         packCost:"",
         product: "",
         product: "",
         remark:"",
         remark:"",
@@ -281,7 +281,7 @@ export default {
       number: 0,
       number: 0,
       customInfoList:[],
       customInfoList:[],
       loading: false,
       loading: false,
-      selectCustomName:'',
+      selectGhsName:'',
       t:null,
       t:null,
       currentShop:{default:0,pfLevel:0},
       currentShop:{default:0,pfLevel:0},
       diffList:[],
       diffList:[],
@@ -289,7 +289,9 @@ export default {
       currentItem:{},
       currentItem:{},
       classList:[],
       classList:[],
       changeType:'add',
       changeType:'add',
-      TT:null
+      TT:null,
+			selectJobType: "purchase",
+      globalCheckStock:false
     };
     };
   },
   },
 	mixins: [productMins],
 	mixins: [productMins],
@@ -328,7 +330,7 @@ export default {
 
 
   },
   },
   mounted() {
   mounted() {
-    if(this.form.customId == 0){
+    if(this.form.ghsId == 0){
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.customref.focus()
         this.$refs.customref.focus()
       })
       })
@@ -491,34 +493,34 @@ export default {
       }
       }
     },
     },
     comeBack(){
     comeBack(){
-      this.form.customId = 0
-      this.form.customName = ''
+      this.form.ghsId = 0
+      this.form.ghsName = ''
       this.customInfoList = []
       this.customInfoList = []
       this.desk = 'searchCustom'
       this.desk = 'searchCustom'
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.customref.focus()
         this.$refs.customref.focus()
       })
       })
     },
     },
-    selectCustomFn(e){
+    selectGhsFn(e){
       if(e.id && e.name){
       if(e.id && e.name){
         let that = this
         let that = this
         that.TT = setTimeout(function(){
         that.TT = setTimeout(function(){
           that.desk = 'selectedList'
           that.desk = 'selectedList'
         },2500)
         },2500)
-        this.form.customId = e.id
-        this.form.customName = e.name
+        this.form.ghsId = e.id
+        this.form.ghsName = e.name
         this.selectJobId = e.id
         this.selectJobId = e.id
-        this.getFromStorage(true)
+        this.getFromStorage(false)
         this.$nextTick(()=>{
         this.$nextTick(()=>{
           this.$refs['itemSearchRef'].focus()
           this.$refs['itemSearchRef'].focus()
         })
         })
       }
       }
 		},
 		},
-		searchCustomInfo(query) {
+		selectGhsInfo(query) {
 			let that = this
 			let that = this
 			if (query !== '') {
 			if (query !== '') {
 				this.loading = true;
 				this.loading = true;
-				this.$service.custom.list({name:query}).then(res=>{
+				this.$service.ghs.list({name:query}).then(res=>{
 					that.loading = false
 					that.loading = false
 					that.customInfoList = res.list	
 					that.customInfoList = res.list	
 				})
 				})
@@ -532,8 +534,8 @@ export default {
     },
     },
     createOrder(){
     createOrder(){
       let that = this
       let that = this
-      if(this.form.customId == 0){
-        this.$message({message: '请选择客户',type: 'warning'})
+      if(this.form.ghsId == 0){
+        this.$message({message: '请选择供货商',type: 'warning'})
         return false
         return false
       }
       }
 
 
@@ -591,8 +593,8 @@ export default {
       })
       })
     },
     },
     formReset(){
     formReset(){
-      this.form.customId = 0
-      this.form.customName = ''
+      this.form.ghsId = 0
+      this.form.ghsName = ''
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.customref.focus()
         this.$refs.customref.focus()
       })
       })
@@ -633,7 +635,7 @@ export default {
       this.searchOldVal = this.searchVal;
       this.searchOldVal = this.searchVal;
       this.desk = 'searchList';
       this.desk = 'searchList';
       let hasExists = []
       let hasExists = []
-      await this.$service.item.getItemList({search:this.searchVal,requestType:'kd',pageSize:20}).then(res=>{
+      await this.$service.item.getItemList({search:this.searchVal,requestType:'cg',pageSize:20}).then(res=>{
         let list = this.$util.copyObject(res.list)
         let list = this.$util.copyObject(res.list)
         if(!that.$util.isEmpty(list)){
         if(!that.$util.isEmpty(list)){
           list = list.sort(this.sorts_fun('classId'))
           list = list.sort(this.sorts_fun('classId'))