|
@@ -42,9 +42,9 @@
|
|
|
</ws-select>
|
|
|
<!-- <ws-input v-model="deptBudgetList.shippingType" placeholder="请输入运输方式" maxlength="100" size="small" /> -->
|
|
|
</ws-form-item>
|
|
|
- <!--买方-->
|
|
|
- <ws-form-item label="买方" span="1" prop="buyer" class="readonly">
|
|
|
- <el-select v-model="deptBudgetList.buyer" placeholder="请选择买方名称" class="typeselect" filterable clearable
|
|
|
+ <!--库方-->
|
|
|
+ <ws-form-item label="库方" span="1" prop="buyer" class="readonly">
|
|
|
+ <el-select v-model="deptBudgetList.buyer" placeholder="请选择库方名称" class="typeselect" filterable clearable
|
|
|
@change="buyerSelect">
|
|
|
<el-option v-for="(item,index) in customerinfo" :key="index" :label="item.customerName"
|
|
|
:value="item.customerName" />
|
|
@@ -54,14 +54,14 @@
|
|
|
<ws-form-item label="结算方式" span="1" prop="settlementMethod">
|
|
|
<ws-input v-model="deptBudgetList.settlementMethod" placeholder="请输入结算方式" maxlength="120" size="small" />
|
|
|
</ws-form-item>
|
|
|
- <!--卖方-->
|
|
|
- <ws-form-item label="卖方" span="1" prop="seller" class="readonly">
|
|
|
+ <!--承租方-->
|
|
|
+ <ws-form-item label="承租方" span="1" prop="seller" class="readonly">
|
|
|
<el-autocomplete class="inline-input" v-model="deptBudgetList.seller" :fetch-suggestions="querySearch2"
|
|
|
- placeholder="请输入卖方名称" @select="handleSelect"></el-autocomplete>
|
|
|
+ placeholder="请输入承租方名称" @select="handleSelect"></el-autocomplete>
|
|
|
</ws-form-item>
|
|
|
- <ws-form-item label="交货方式" span="1" prop="seller" class="readonly">
|
|
|
- <el-radio v-model="deptBudgetList.deliverType" label="1">我方送货</el-radio>
|
|
|
- <el-radio v-model="deptBudgetList.deliverType" label="2">对方自提</el-radio>
|
|
|
+ <ws-form-item label="交货方式" span="1" prop="seller" class="readonly">
|
|
|
+ <el-radio v-model="deptBudgetList.deliverType" label="2">对方送货</el-radio>
|
|
|
+ <el-radio v-model="deptBudgetList.deliverType" label="1">我方自提</el-radio>
|
|
|
<!-- <el-radio v-model="deptBudgetList.deliverType" v-if="deptBudgetList.priceType == '随行就市'" disabled label="1">
|
|
|
我方自提</el-radio>
|
|
|
<el-radio v-model="deptBudgetList.deliverType" v-else label="1">我方自提</el-radio>
|
|
@@ -69,10 +69,16 @@
|
|
|
对方送货</el-radio>
|
|
|
<el-radio v-model="deptBudgetList.deliverType" v-else label="2">对方送货</el-radio> -->
|
|
|
</ws-form-item>
|
|
|
- <!--买方电话-->
|
|
|
- <ws-form-item label="买方电话" span="1" prop="contractNo">
|
|
|
+ <!-- 发货反馈负责人(多选) -->
|
|
|
+ <ws-form-item label="发货反馈负责人" span="1" prop="agent" v-if="deptBudgetList.deliverType == '2'">
|
|
|
+ <el-select v-model="deptBudgetList.agent" multiple filterable clearable allow-create default-first-option placeholder="请选择经办人" @change="feedbackLeaderChange" >
|
|
|
+ <el-option v-for="(item,index1) in feedbackLeaders" :key="index1" :label="item.staffName" :value="item.staffName"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <!--库方电话-->
|
|
|
+ <ws-form-item label="库方电话" span="1" prop="contractNo">
|
|
|
<el-autocomplete class="inline-input" v-model="deptBudgetList.buyerPhone" :fetch-suggestions="querySearch3"
|
|
|
- placeholder="请输入买方电话" @select="handleSelect"></el-autocomplete>
|
|
|
+ placeholder="请输入库方电话" @select="handleSelect"></el-autocomplete>
|
|
|
</ws-form-item>
|
|
|
<!--包装方式-->
|
|
|
<ws-form-item label="包装方式" span="1" prop="packingMethod">
|
|
@@ -82,11 +88,11 @@
|
|
|
:value="item.constValue" />
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
|
- <!--卖方电话-->
|
|
|
- <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
|
|
|
- <!-- <ws-input v-model="deptBudgetList.sellerPhone" placeholder="请输入卖方电话" maxlength="100" size="small" /> -->
|
|
|
+ <!--承租方电话-->
|
|
|
+ <ws-form-item label="承租方电话" span="1" prop="sellerPhone">
|
|
|
+ <!-- <ws-input v-model="deptBudgetList.sellerPhone" placeholder="请输入承租方电话" maxlength="100" size="small" /> -->
|
|
|
<el-autocomplete class="inline-input" v-model="deptBudgetList.sellerPhone" :fetch-suggestions="querySearch4"
|
|
|
- placeholder="请输入卖方电话" @select="handleSelect"></el-autocomplete>
|
|
|
+ placeholder="请输入承租方电话" @select="handleSelect"></el-autocomplete>
|
|
|
</ws-form-item>
|
|
|
<!--验收方式-->
|
|
|
<ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
|
|
@@ -175,8 +181,8 @@
|
|
|
<ws-input v-model="deptBudgetList.storageFee" placeholder="请输入仓储费" maxlength="20" size="small" />
|
|
|
</ws-form-item>
|
|
|
<!--合同单价(元/吨)-->
|
|
|
- <ws-form-item class="readonly" label="合同单价(元/吨)" span="1" prop="unitContractPrice">
|
|
|
- <ws-input @input="pricechange" v-model="deptBudgetList.unitContractPrice" placeholder="请输入合同单价"
|
|
|
+ <ws-form-item label="合同单价(元/吨)" span="1" prop="unitContractPrice">
|
|
|
+ <ws-input @input="pricechange" v-model="deptBudgetList.unitContractPrice" placeholder="选填"
|
|
|
maxlength="100" size="small" />
|
|
|
</ws-form-item>
|
|
|
<ws-form-item label="代储费起算重量" span="1" prop="storageFeeWeight">
|
|
@@ -199,10 +205,16 @@
|
|
|
<ws-date-picker v-model="deptBudgetList.storageFeeEnddate" type="date" placeholder="请选择代储费预计终止日期"
|
|
|
value-format="yyyy-MM-dd" />
|
|
|
</ws-form-item>
|
|
|
- <ws-form-item label="最终实际成交量(吨)" span="1" prop="finalTradingVolume">
|
|
|
+ <ws-form-item v-show="deptBudgetList.deliverType != 2" label="临时仓库负责人" span="1" prop="packingMethod">
|
|
|
+ <el-select v-model="deptBudgetList.personPhone" multiple placeholder="请选择临时仓库负责人" filterable clearable
|
|
|
+ @change="selectstaff">
|
|
|
+ <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffMobilePhone" />
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <!-- <ws-form-item label="最终实际成交量(吨)" span="1" prop="finalTradingVolume">
|
|
|
<ws-input v-model="deptBudgetList.finalTradingVolume" placeholder="请输入最终实际成交量" maxlength="100"
|
|
|
size="small" />
|
|
|
- </ws-form-item>
|
|
|
+ </ws-form-item> -->
|
|
|
</ws-info-table>
|
|
|
</ws-form>
|
|
|
</div>
|
|
@@ -424,7 +436,7 @@
|
|
|
gradeList: [],
|
|
|
ChapterTwoList: [],
|
|
|
deptBudgetList: {
|
|
|
- deliverType: '1',
|
|
|
+ deliverType: '2',
|
|
|
agreementType: '代储合同',
|
|
|
finalTradingVolume: 0,
|
|
|
totalContractPrice: 0,
|
|
@@ -516,9 +528,23 @@
|
|
|
}
|
|
|
// console.log(this.deptBudgetList)
|
|
|
},
|
|
|
- feedbackLeaderChange(e) {
|
|
|
- this.deptBudgetList.feedbackLeader = this.feedbackLeaders[e].staffName
|
|
|
- this.deptBudgetList.feedbackLeaderPhone = this.feedbackLeaders[e].staffMobilePhone
|
|
|
+ feedbackLeaderChange(e){
|
|
|
+ this.deptBudgetList.feedbackLeaderPhone = ""
|
|
|
+ for(var num = 0 ; num < e.length ; num++){
|
|
|
+ for(var i = 0 ; i < this.feedbackLeaders.length ; i++){
|
|
|
+ if(e[num] == this.feedbackLeaders[i].staffName){
|
|
|
+ if(!this.deptBudgetList.feedbackLeaderPhone){
|
|
|
+ this.deptBudgetList.feedbackLeaderPhone = this.feedbackLeaders[i].staffMobilePhone
|
|
|
+ break
|
|
|
+ }else{
|
|
|
+ this.deptBudgetList.feedbackLeaderPhone += ","+this.feedbackLeaders[i].staffMobilePhone
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.feedbackLeader = e.toString()
|
|
|
+ // this.deptBudgetList.feedbackLeader = this.feedbackLeaders[e].staffName
|
|
|
+ // this.deptBudgetList.feedbackLeaderPhone = this.feedbackLeaders[e].staffMobilePhone
|
|
|
},
|
|
|
buyerSelect(item) {
|
|
|
// console.log(item)
|
|
@@ -605,7 +631,7 @@
|
|
|
},
|
|
|
returnsales() {
|
|
|
this.deptBudgetList = {
|
|
|
- deliverType: '1',
|
|
|
+ deliverType: '2',
|
|
|
agreementType: '代储合同',
|
|
|
finalTradingVolume: 0,
|
|
|
totalContractPrice: 0,
|
|
@@ -656,6 +682,18 @@
|
|
|
.then((response) => {
|
|
|
this.ChapterTwoList = response
|
|
|
})
|
|
|
+ // 发货反馈负责人
|
|
|
+ getstaff({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId')
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.feedbackLeaders = response
|
|
|
+ let _obj = [] //发货反馈负责人下拉列表第一个添加 "无需发货反馈(默认)"
|
|
|
+ _obj.staffName = "无需发货反馈"
|
|
|
+ _obj.staffMobilePhone = ""
|
|
|
+ this.feedbackLeaders.unshift(_obj)
|
|
|
+ })
|
|
|
getcustomerinfo({
|
|
|
compId: localStorage.getItem('ws-pf_compId'),
|
|
|
}).toPromise()
|
|
@@ -777,14 +815,14 @@
|
|
|
}
|
|
|
if (!this.deptBudgetList.buyer) {
|
|
|
this.$message({
|
|
|
- message: '买方名称不能为空',
|
|
|
+ message: '库方名称不能为空',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
if (this.deptBudgetList.buyer.length > 30) {
|
|
|
this.$message({
|
|
|
- message: '买方名称长度不符合要求,请输入30个字符之内!',
|
|
|
+ message: '库方名称长度不符合要求,请输入30个字符之内!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
@@ -808,42 +846,42 @@
|
|
|
}
|
|
|
if (!this.deptBudgetList.seller) {
|
|
|
this.$message({
|
|
|
- message: '请输入卖方名称!',
|
|
|
+ message: '请输入承租方名称!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
if (this.deptBudgetList.seller.length > 30) {
|
|
|
this.$message({
|
|
|
- message: '卖方名称长度不符合要求,请输入30个字符之内!',
|
|
|
+ message: '承租方名称长度不符合要求,请输入30个字符之内!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
if (!this.deptBudgetList.buyerPhone) {
|
|
|
this.$message({
|
|
|
- message: '请输入买方电话!',
|
|
|
+ message: '请输入库方电话!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
// if (isNaN(this.deptBudgetList.buyerPhone)) {
|
|
|
// this.$message({
|
|
|
- // message: '输入买方电话有误!',
|
|
|
+ // message: '输入库方电话有误!',
|
|
|
// type: 'warning',
|
|
|
// })
|
|
|
// return
|
|
|
// }
|
|
|
if (!this.deptBudgetList.sellerPhone) {
|
|
|
this.$message({
|
|
|
- message: '请输入卖方电话!',
|
|
|
+ message: '请输入承租方电话!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
if (isNaN(this.deptBudgetList.sellerPhone)) {
|
|
|
this.$message({
|
|
|
- message: '输入卖方电话有误!',
|
|
|
+ message: '输入承租方电话有误!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
@@ -967,51 +1005,51 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.unitContractPrice) {
|
|
|
- this.$message({
|
|
|
- message: '请输入合同单价!',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (
|
|
|
- isNaN(this.deptBudgetList.unitContractPrice) ||
|
|
|
- (String(this.deptBudgetList.unitContractPrice).indexOf('.') != -1 &&
|
|
|
- String(this.deptBudgetList.unitContractPrice).length -
|
|
|
- (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
|
|
|
- 2) ||
|
|
|
- this.deptBudgetList.unitContractPrice <= 0 ||
|
|
|
- this.deptBudgetList.unitContractPrice > 10000
|
|
|
- ) {
|
|
|
- this.$message({
|
|
|
- message: '合同单价输入有误!',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (!this.deptBudgetList.totalContractPrice) {
|
|
|
- this.$message({
|
|
|
- message: '请输入合同总价!',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (
|
|
|
- isNaN(this.deptBudgetList.totalContractPrice) ||
|
|
|
- (String(this.deptBudgetList.totalContractPrice).indexOf('.') != -1 &&
|
|
|
- String(this.deptBudgetList.totalContractPrice).length -
|
|
|
- (String(this.deptBudgetList.totalContractPrice).indexOf('.') +
|
|
|
- 1) >
|
|
|
- 2) ||
|
|
|
- this.deptBudgetList.totalContractPrice <= 0 ||
|
|
|
- this.deptBudgetList.totalContractPrice > 1000000000
|
|
|
- ) {
|
|
|
- this.$message({
|
|
|
- message: '合同总价输入有误!',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
+ // if (!this.deptBudgetList.unitContractPrice) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '请输入合同单价!',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (
|
|
|
+ // isNaN(this.deptBudgetList.unitContractPrice) ||
|
|
|
+ // (String(this.deptBudgetList.unitContractPrice).indexOf('.') != -1 &&
|
|
|
+ // String(this.deptBudgetList.unitContractPrice).length -
|
|
|
+ // (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
|
|
|
+ // 2) ||
|
|
|
+ // this.deptBudgetList.unitContractPrice <= 0 ||
|
|
|
+ // this.deptBudgetList.unitContractPrice > 10000
|
|
|
+ // ) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '合同单价输入有误!',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!this.deptBudgetList.totalContractPrice) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '请输入合同总价!',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (
|
|
|
+ // isNaN(this.deptBudgetList.totalContractPrice) ||
|
|
|
+ // (String(this.deptBudgetList.totalContractPrice).indexOf('.') != -1 &&
|
|
|
+ // String(this.deptBudgetList.totalContractPrice).length -
|
|
|
+ // (String(this.deptBudgetList.totalContractPrice).indexOf('.') +
|
|
|
+ // 1) >
|
|
|
+ // 2) ||
|
|
|
+ // this.deptBudgetList.totalContractPrice <= 0 ||
|
|
|
+ // this.deptBudgetList.totalContractPrice > 1000000000
|
|
|
+ // ) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '合同总价输入有误!',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
//时间
|
|
|
if (
|
|
|
new Date(this.deptBudgetList.deliveryDateStart).getTime() >
|
|
@@ -1357,7 +1395,7 @@
|
|
|
addList(this.deptBudgetList)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- // 存储买方、卖方、买方电话、卖方电话
|
|
|
+ // 存储库方、承租方、库方电话、承租方电话
|
|
|
let _data = {
|
|
|
byer: this.deptBudgetList.buyer,
|
|
|
seller: this.deptBudgetList.seller,
|
|
@@ -1434,7 +1472,7 @@
|
|
|
localStorage.setItem('deptBudgetList_data4', JSON.stringify(this.restaurants4));
|
|
|
this.$message.success('添加成功')
|
|
|
this.deptBudgetList = {
|
|
|
- deliverType: '1',
|
|
|
+ deliverType: '2',
|
|
|
agreementType: '代储合同',
|
|
|
finalTradingVolume: 0,
|
|
|
totalContractPrice: 0,
|
|
@@ -1564,7 +1602,7 @@
|
|
|
},
|
|
|
selectpriceType(e) {
|
|
|
if (e == '随行就市') {
|
|
|
- this.deptBudgetList.deliverType = '1'
|
|
|
+ this.deptBudgetList.deliverType = '2'
|
|
|
}
|
|
|
},
|
|
|
weightchange(e) {
|