|
@@ -93,9 +93,15 @@
|
|
<ws-form-item v-if='statusTypetext!="复检"&&serviceManagementType==1' label="扣款" span="1" prop="deductionAmount">
|
|
<ws-form-item v-if='statusTypetext!="复检"&&serviceManagementType==1' label="扣款" span="1" prop="deductionAmount">
|
|
<ws-input @input="kkInput(deptBudgetList.deductionAmount)" v-model="deptBudgetList.deductionAmount" placeholder="选填,1-10个字符" maxlength="10" size="small" />
|
|
<ws-input @input="kkInput(deptBudgetList.deductionAmount)" v-model="deptBudgetList.deductionAmount" placeholder="选填,1-10个字符" maxlength="10" size="small" />
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
- <ws-form-item label="货名" span="1" prop="inOutTaskNo">
|
|
|
|
|
|
+ <ws-form-item v-if='serviceManagementType==1' label="货名" span="1" prop="inOutTaskNo">
|
|
<ws-input v-model="deptBudgetList.goodsName" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
<ws-input v-model="deptBudgetList.goodsName" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
|
|
+ <ws-form-item v-if='serviceManagementType==3' label="货名" span="1" prop="inOutTaskNo">
|
|
|
|
+ <el-select v-model="deptBudgetList.goodsName" clearable filterable placeholder="请选择" class="typeselect"
|
|
|
|
+ @change="goodsNameChange" :disabled="goodsdisabled">
|
|
|
|
+ <el-option v-for="item in goodnameList" :key="item.valueKey" :label="item.goodsName" :value="item.goodsName" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </ws-form-item>
|
|
<ws-form-item v-if='statusTypetext!="初检"&&serviceManagementType==1' label="经办人" span="1" prop="agent">
|
|
<ws-form-item v-if='statusTypetext!="初检"&&serviceManagementType==1' label="经办人" span="1" prop="agent">
|
|
<ws-input v-model="deptBudgetList.agent" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
<ws-input v-model="deptBudgetList.agent" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
@@ -129,9 +135,13 @@
|
|
<el-date-picker :disabled='recheck' v-model="deptBudgetList.inOutDate" placeholder="请选择入库日期" type="date" value-format="yyyy-MM-dd"></el-date-picker>
|
|
<el-date-picker :disabled='recheck' v-model="deptBudgetList.inOutDate" placeholder="请选择入库日期" type="date" value-format="yyyy-MM-dd"></el-date-picker>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
<ws-form-item label="运输方式" span="1" prop="outType">
|
|
<ws-form-item label="运输方式" span="1" prop="outType">
|
|
- <el-select :disabled='recheck' v-model="deptBudgetList.outType" placeholder="请选择运输方式">
|
|
|
|
|
|
+ <el-select v-if='serviceManagementType==1' :disabled='recheck' v-model="deptBudgetList.outType" placeholder="请选择运输方式">
|
|
<el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
|
|
<el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
|
|
</el-select>
|
|
</el-select>
|
|
|
|
+ <el-select v-if='serviceManagementType==3' @change='outTypechange' :disabled='recheck' v-model="outType" placeholder="请选择运输方式">
|
|
|
|
+ <el-option v-for="item in multiSelector1" :key="item.id" :label="item.type+'('+item.contractNo+' '+item.seller+')'" :value="item.id" />
|
|
|
|
+ <el-option key="tayun1" label="他运" value="他运" />
|
|
|
|
+ </el-select>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
<ws-form-item v-if='serviceManagementType==1||serviceManagementType==3&&deptBudgetList.outType=="自运"' label="车队" span="1" prop="fleetName">
|
|
<ws-form-item v-if='serviceManagementType==1||serviceManagementType==3&&deptBudgetList.outType=="自运"' label="车队" span="1" prop="fleetName">
|
|
<el-select :disabled='recheck' v-model="deptBudgetList.fleet" placeholder="非车队车辆">
|
|
<el-select :disabled='recheck' v-model="deptBudgetList.fleet" placeholder="非车队车辆">
|
|
@@ -299,6 +309,10 @@
|
|
inspectAdd,
|
|
inspectAdd,
|
|
getinspectEdit,
|
|
getinspectEdit,
|
|
getinspectcontractno,
|
|
getinspectcontractno,
|
|
|
|
+ getinspectLookUnitPrice,
|
|
|
|
+ getcustomer,
|
|
|
|
+ getDryGrainPrice,
|
|
|
|
+ getinspectLookGoods,
|
|
} from '@/model/houseSelfCollect/index'
|
|
} from '@/model/houseSelfCollect/index'
|
|
import {
|
|
import {
|
|
pullDown,
|
|
pullDown,
|
|
@@ -323,6 +337,7 @@
|
|
isShowPrint:false,
|
|
isShowPrint:false,
|
|
typeList: ['干粮', '潮粮'],
|
|
typeList: ['干粮', '潮粮'],
|
|
disablednotarize:false,
|
|
disablednotarize:false,
|
|
|
|
+ goodsdisabled:false,
|
|
deptBudgetList:{
|
|
deptBudgetList:{
|
|
type: '潮粮',
|
|
type: '潮粮',
|
|
freight: 0,
|
|
freight: 0,
|
|
@@ -378,13 +393,16 @@
|
|
titleNoOther:'',
|
|
titleNoOther:'',
|
|
},
|
|
},
|
|
taskNolist:[],
|
|
taskNolist:[],
|
|
|
|
+ outType:'',
|
|
|
|
+ purchasePriceList:[],
|
|
disabled:false,
|
|
disabled:false,
|
|
|
|
+ goodnameList:[],
|
|
disabled2:false,
|
|
disabled2:false,
|
|
disabled1:false,
|
|
disabled1:false,
|
|
disabledfright:true,
|
|
disabledfright:true,
|
|
recheck:false,
|
|
recheck:false,
|
|
storageType:[],
|
|
storageType:[],
|
|
- multiSelector:[],
|
|
|
|
|
|
+ multiSelector1:[],
|
|
isSelectType:false,
|
|
isSelectType:false,
|
|
warehouseName:'',
|
|
warehouseName:'',
|
|
warehouseCount:'',
|
|
warehouseCount:'',
|
|
@@ -445,6 +463,36 @@
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
+ goodsNameChange(e){
|
|
|
|
+ for (let q = 0; q < this.goodnameList.length; q++) {
|
|
|
|
+ if(this.goodnameList[q].contractNo=e){
|
|
|
|
+ this.deptBudgetList.goodsName=this.goodnameList[q].goodsName
|
|
|
|
+ this.deptBudgetList.goodsNameKey=this.goodnameList[q].goodsNameKey
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.waterContentChange()
|
|
|
|
+ },
|
|
|
|
+ outTypechange(e){
|
|
|
|
+ console.log(e)
|
|
|
|
+ if(e!='他运'){
|
|
|
|
+ for (let i = 0; i < this.multiSelector1.length; i++) {
|
|
|
|
+ this.deptBudgetList.contractNo=this.multiSelector1[i].contractNo
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ for (let q = 0; q < this.outContractNo.length; q++) {
|
|
|
|
+ if(this.outContractNo[q].contractNo=this.deptBudgetList.contractNo){
|
|
|
|
+ this.deptBudgetList.goodsName=this.outContractNo[q].goodsName
|
|
|
|
+ this.deptBudgetList.goodsNameKey=this.outContractNo[q].goodsNameKey
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.deptBudgetList.outType='自运'
|
|
|
|
+ this.goodsdisabled=true
|
|
|
|
+ this.waterContentChange()
|
|
|
|
+ }else{
|
|
|
|
+ this.deptBudgetList.outType='他运'
|
|
|
|
+ this.goodsdisabled=false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
printSmall() {
|
|
printSmall() {
|
|
window.open('../../../static/inspectionnew.html?type=1&dataList=' + JSON.stringify(this.deptBudgetList))
|
|
window.open('../../../static/inspectionnew.html?type=1&dataList=' + JSON.stringify(this.deptBudgetList))
|
|
},
|
|
},
|
|
@@ -543,76 +591,42 @@
|
|
}
|
|
}
|
|
//潮粮单价改变事件
|
|
//潮粮单价改变事件
|
|
if (
|
|
if (
|
|
- this.inspect.goodsName &&
|
|
|
|
- this.inspect.waterContent &&
|
|
|
|
- this.inspect.grade
|
|
|
|
|
|
+ this.deptBudgetList.goodsName &&
|
|
|
|
+ this.deptBudgetList.waterContent &&
|
|
|
|
+ this.deptBudgetList.grade
|
|
) {
|
|
) {
|
|
getinspectLookUnitPrice({
|
|
getinspectLookUnitPrice({
|
|
warehouseId: this.cangid,
|
|
warehouseId: this.cangid,
|
|
- goodsName: this.inspect.goodsName,
|
|
|
|
- waterContent: this.inspect.waterContent,
|
|
|
|
- grade: this.inspect.grade,
|
|
|
|
|
|
+ goodsName: this.deptBudgetList.goodsName,
|
|
|
|
+ waterContent: this.deptBudgetList.waterContent,
|
|
|
|
+ grade: this.deptBudgetList.grade,
|
|
})
|
|
})
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
- if (this.inspect.paramType == '1') {
|
|
|
|
- this.inspect.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.inspect
|
|
|
|
- .buckleMiscellaneous) / 100 * parseFloat(this.inspect.dryGrainPrice)).toFixed(4)
|
|
|
|
|
|
+ if (this.deptBudgetList.paramType == '1') {
|
|
|
|
+ this.deptBudgetList.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.deptBudgetList
|
|
|
|
+ .buckleMiscellaneous) / 100 * parseFloat(this.deptBudgetList.dryGrainPrice)).toFixed(4)
|
|
} else {
|
|
} else {
|
|
if (this.inspect.type == '干粮') {
|
|
if (this.inspect.type == '干粮') {
|
|
if (response == 0) {
|
|
if (response == 0) {
|
|
getDryGrainPrice({
|
|
getDryGrainPrice({
|
|
warehouseId: this.cangid,
|
|
warehouseId: this.cangid,
|
|
- goodsName: this.inspect.goodsName
|
|
|
|
|
|
+ goodsName: this.deptBudgetList.goodsName
|
|
})
|
|
})
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
- this.$set(this.inspect, 'dryGrainPrice', response)
|
|
|
|
|
|
+ this.$set(this.deptBudgetList, 'dryGrainPrice', response)
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- this.inspect.dryGrainPrice = response
|
|
|
|
|
|
+ this.deptBudgetList.dryGrainPrice = response
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- this.inspect.tidalGrainPrice = response
|
|
|
|
|
|
+ this.deptBudgetList.tidalGrainPrice = response
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- if (this.inspect.goodsName && this.inspect.customerName) {
|
|
|
|
- // //查看当前用户对应货名有未结算状态的送货
|
|
|
|
- // let count = 0
|
|
|
|
- // if (
|
|
|
|
- // this.inspect.goodsName &&
|
|
|
|
- // this.inspect.customerName
|
|
|
|
- // ) {
|
|
|
|
- // getCount({
|
|
|
|
- // compId: localStorage.getItem('ws-pf_compId'),
|
|
|
|
- // customerName: this.inspect.customerName,
|
|
|
|
- // goodsName: this.inspect.goodsName,
|
|
|
|
- // customerNumberCard: this.inspect.customerNumberCard
|
|
|
|
- // }).toPromise()
|
|
|
|
- // .then((response) => {
|
|
|
|
- // count = response
|
|
|
|
- // })
|
|
|
|
- // // // 货名下拉校验
|
|
|
|
- // // getamount({
|
|
|
|
- // // compId: localStorage.getItem('ws-pf_compId'),
|
|
|
|
- // // customerName: this.inspect.customerName,
|
|
|
|
- // // goodsName: this.inspect.goodsName,
|
|
|
|
- // // customerNumberCard:this.inspect.customerNumberCard
|
|
|
|
- // // })
|
|
|
|
- // // .toPromise()
|
|
|
|
- // // .then((response) => {
|
|
|
|
- // // for (let i = 0; i < this.purchasePriceList.length; i++) {
|
|
|
|
- // // if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
|
|
|
|
- // // if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0 )&&this.tipFlag) {
|
|
|
|
- // // this.tipFlag = false
|
|
|
|
- // // this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
|
|
|
|
- // // }
|
|
|
|
- // // }
|
|
|
|
- // // }
|
|
|
|
- // // })
|
|
|
|
- // }
|
|
|
|
|
|
+ if (this.deptBudgetList.goodsName && this.deptBudgetList.customerName) {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
opendBtn(){
|
|
opendBtn(){
|
|
@@ -839,6 +853,7 @@
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
add(){
|
|
add(){
|
|
|
|
+ this.outType=''
|
|
this.deptBudgetList={
|
|
this.deptBudgetList={
|
|
type: '潮粮',
|
|
type: '潮粮',
|
|
freight: 0,
|
|
freight: 0,
|
|
@@ -969,47 +984,64 @@
|
|
// })
|
|
// })
|
|
// return
|
|
// return
|
|
// }
|
|
// }
|
|
- if (!this.deptBudgetList.cost) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '未获取到成本,请编辑后提交',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (
|
|
|
|
- this.deptBudgetList.cost < 0 ||
|
|
|
|
- this.deptBudgetList.cost > 20000 ||
|
|
|
|
- (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
|
|
|
|
- String(this.deptBudgetList.cost).length -
|
|
|
|
- (String(this.deptBudgetList.cost).indexOf('.') + 1) >
|
|
|
|
- 2)
|
|
|
|
- ) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '成本输入错误',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (!String(this.deptBudgetList.freight)) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '运费不能为空',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
|
|
+ console.log(this.serviceManagementType)
|
|
|
|
+ if(this.serviceManagementType==1){
|
|
|
|
+ if (!this.deptBudgetList.cost) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '未获取到成本,请编辑后提交',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.cost < 0 ||
|
|
|
|
+ this.deptBudgetList.cost > 20000 ||
|
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.cost).length -
|
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') + 1) >
|
|
|
|
+ 2)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '成本输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!String(this.deptBudgetList.freight)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '运费不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.freight < 0 ||
|
|
|
|
+ this.deptBudgetList.freight > 100000 ||
|
|
|
|
+ (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.freight).length -
|
|
|
|
+ (String(this.deptBudgetList.freight).indexOf('.') + 1) >
|
|
|
|
+ 2)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '运费输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.inOutDate) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '入库日期不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.inOutType) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '入库类型不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- if (
|
|
|
|
- this.deptBudgetList.freight < 0 ||
|
|
|
|
- this.deptBudgetList.freight > 100000 ||
|
|
|
|
- (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
|
|
|
|
- String(this.deptBudgetList.freight).length -
|
|
|
|
- (String(this.deptBudgetList.freight).indexOf('.') + 1) >
|
|
|
|
- 2)
|
|
|
|
- ) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '运费输入错误',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
}
|
|
}
|
|
this.deptBudgetList.warehouseInOutDetail.grade=this.deptBudgetList.grade
|
|
this.deptBudgetList.warehouseInOutDetail.grade=this.deptBudgetList.grade
|
|
if (!this.deptBudgetList.grade) {
|
|
if (!this.deptBudgetList.grade) {
|
|
@@ -1027,20 +1059,7 @@
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (!this.deptBudgetList.inOutDate) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '入库日期不能为空!',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (!this.deptBudgetList.inOutType) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '入库类型不能为空!',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
if (!this.deptBudgetList.carNo) {
|
|
if (!this.deptBudgetList.carNo) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '车牌号不能为空',
|
|
message: '车牌号不能为空',
|
|
@@ -1122,13 +1141,16 @@
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (!this.deptBudgetList.contractNo) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '合同编号不能为空',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
|
|
+ if(this.serviceManagementType==1||this.serviceManagementType==3&&this.deptBudgetList.outType=='自运'){
|
|
|
|
+ if (!this.deptBudgetList.contractNo) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '合同编号不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
|
|
// if (
|
|
// if (
|
|
// this.deptBudgetList.contractNo.length < 6 ||
|
|
// this.deptBudgetList.contractNo.length < 6 ||
|
|
@@ -1838,6 +1860,7 @@
|
|
this.deptBudgetList.gradeKey = this.gradeList[i].constKey
|
|
this.deptBudgetList.gradeKey = this.gradeList[i].constKey
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ this.waterContentChange()
|
|
},
|
|
},
|
|
reselectpackingMethod(e) {
|
|
reselectpackingMethod(e) {
|
|
for (var i = 0; i < this.gradeList.length; i++) {
|
|
for (var i = 0; i < this.gradeList.length; i++) {
|
|
@@ -1864,6 +1887,14 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ getinspectLookGoods({
|
|
|
|
+ warehouseId: this.cangid
|
|
|
|
+ })
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.goodnameList = response
|
|
|
|
+ this.purchasePriceList = response
|
|
|
|
+ })
|
|
// 品级
|
|
// 品级
|
|
pullDown({
|
|
pullDown({
|
|
constId: 'CON3',
|
|
constId: 'CON3',
|
|
@@ -1882,8 +1913,15 @@
|
|
this.options1 = response
|
|
this.options1 = response
|
|
this.outContractNo = response
|
|
this.outContractNo = response
|
|
})
|
|
})
|
|
|
|
+ this.multiSelector1=[]
|
|
getinspectcontractno({compId:localStorage.getItem('ws-pf_compId'),warehouseName:this.warehouseName}).toPromise()
|
|
getinspectcontractno({compId:localStorage.getItem('ws-pf_compId'),warehouseName:this.warehouseName}).toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
|
|
+ if(response.contractManagementInfoList){
|
|
|
|
+ for (let i = 0; i < response.contractManagementInfoList.length; i++) {
|
|
|
|
+ response.contractManagementInfoList[i].type='自运'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.multiSelector1=response.contractManagementInfoList
|
|
// this.options1 = response
|
|
// this.options1 = response
|
|
// this.outContractNo = response
|
|
// this.outContractNo = response
|
|
})
|
|
})
|