|
|
@@ -1,15 +1,15 @@
|
|
|
<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>
|
|
|
- <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-select>
|
|
|
</div>
|
|
|
<div class="app-list-content" v-else>
|
|
|
<div class="left_box">
|
|
|
<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>提交:F9</span>
|
|
|
<span>修改:回车</span>
|
|
|
@@ -111,8 +111,8 @@
|
|
|
<el-dialog title="确认提交" v-if="showCommitPop" :visible.sync="showCommitPop" width="655px" center :close-on-click-modal="false">
|
|
|
<div>
|
|
|
<div class="accounts-list">
|
|
|
- 客户
|
|
|
- <div class="accounts-center">{{form.customName}}</div>
|
|
|
+ 供货商
|
|
|
+ <div class="accounts-center">{{form.ghsName}}</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="accounts-list" v-if="currentShop.pfLevel && currentShop.pfLevel == 1">
|
|
|
@@ -245,8 +245,8 @@ export default {
|
|
|
sendDate: "",
|
|
|
sendTimeWant: "",
|
|
|
sendCost: "",
|
|
|
- customId: "",
|
|
|
- customName:'',
|
|
|
+ ghsId: "",
|
|
|
+ ghsName:'',
|
|
|
packCost:"",
|
|
|
product: "",
|
|
|
remark:"",
|
|
|
@@ -281,7 +281,7 @@ export default {
|
|
|
number: 0,
|
|
|
customInfoList:[],
|
|
|
loading: false,
|
|
|
- selectCustomName:'',
|
|
|
+ selectGhsName:'',
|
|
|
t:null,
|
|
|
currentShop:{default:0,pfLevel:0},
|
|
|
diffList:[],
|
|
|
@@ -289,7 +289,9 @@ export default {
|
|
|
currentItem:{},
|
|
|
classList:[],
|
|
|
changeType:'add',
|
|
|
- TT:null
|
|
|
+ TT:null,
|
|
|
+ selectJobType: "purchase",
|
|
|
+ globalCheckStock:false
|
|
|
};
|
|
|
},
|
|
|
mixins: [productMins],
|
|
|
@@ -328,7 +330,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
mounted() {
|
|
|
- if(this.form.customId == 0){
|
|
|
+ if(this.form.ghsId == 0){
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.customref.focus()
|
|
|
})
|
|
|
@@ -491,34 +493,34 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
comeBack(){
|
|
|
- this.form.customId = 0
|
|
|
- this.form.customName = ''
|
|
|
+ this.form.ghsId = 0
|
|
|
+ this.form.ghsName = ''
|
|
|
this.customInfoList = []
|
|
|
this.desk = 'searchCustom'
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.customref.focus()
|
|
|
})
|
|
|
},
|
|
|
- selectCustomFn(e){
|
|
|
+ selectGhsFn(e){
|
|
|
if(e.id && e.name){
|
|
|
let that = this
|
|
|
that.TT = setTimeout(function(){
|
|
|
that.desk = 'selectedList'
|
|
|
},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.getFromStorage(true)
|
|
|
+ this.getFromStorage(false)
|
|
|
this.$nextTick(()=>{
|
|
|
this.$refs['itemSearchRef'].focus()
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- searchCustomInfo(query) {
|
|
|
+ selectGhsInfo(query) {
|
|
|
let that = this
|
|
|
if (query !== '') {
|
|
|
this.loading = true;
|
|
|
- this.$service.custom.list({name:query}).then(res=>{
|
|
|
+ this.$service.ghs.list({name:query}).then(res=>{
|
|
|
that.loading = false
|
|
|
that.customInfoList = res.list
|
|
|
})
|
|
|
@@ -532,8 +534,8 @@ export default {
|
|
|
},
|
|
|
createOrder(){
|
|
|
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
|
|
|
}
|
|
|
|
|
|
@@ -591,8 +593,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
formReset(){
|
|
|
- this.form.customId = 0
|
|
|
- this.form.customName = ''
|
|
|
+ this.form.ghsId = 0
|
|
|
+ this.form.ghsName = ''
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.customref.focus()
|
|
|
})
|
|
|
@@ -633,7 +635,7 @@ 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=>{
|
|
|
+ await this.$service.item.getItemList({search:this.searchVal,requestType:'cg',pageSize:20}).then(res=>{
|
|
|
let list = this.$util.copyObject(res.list)
|
|
|
if(!that.$util.isEmpty(list)){
|
|
|
list = list.sort(this.sorts_fun('classId'))
|