|
@@ -25,7 +25,7 @@
|
|
|
<ws-form ref="dataList" :model="dataList" :rules="rules">
|
|
|
<div class="basicInformation">
|
|
|
<h2>
|
|
|
- {{ deptBudgetList1.warehouseName }}库
|
|
|
+ {{ deptBudgetList1.warehouseName }}
|
|
|
<span class="position" v-show="this.$route.query.warehouseType == 1">
|
|
|
{{ deptBudgetList1.binNumber }}仓位
|
|
|
</span>
|
|
@@ -149,8 +149,9 @@
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
<!--净重(吨)-->
|
|
|
- <ws-form-item label="扣款" span="1" prop="deductionAmount">
|
|
|
+ <ws-form-item label="扣款(元/吨)" span="1" prop="deductionAmount">
|
|
|
<ws-input
|
|
|
+ @input="kkInput(dataList.deductionAmount)"
|
|
|
v-model="dataList.deductionAmount"
|
|
|
placeholder="请输入扣款金额"
|
|
|
maxlength="120"
|
|
@@ -207,6 +208,7 @@
|
|
|
placeholder
|
|
|
class="typeselect"
|
|
|
@change="selectstorageType"
|
|
|
+ :disabled="isSelectType"
|
|
|
>
|
|
|
<ws-option
|
|
|
v-for="item in storageType"
|
|
@@ -331,14 +333,31 @@
|
|
|
<div class="small-title">化验数据(选填)</div>
|
|
|
<div class="inspector">
|
|
|
<!--质检员-->
|
|
|
- <ws-form-item label="质检员" span="1" prop="qualityInspector">
|
|
|
+ <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
|
|
|
<ws-input
|
|
|
v-model="dataList.warehouseInOutDetail.qualityInspector"
|
|
|
placeholder="请输入质检员姓名"
|
|
|
maxlength="120"
|
|
|
size="small"
|
|
|
/>
|
|
|
- </ws-form-item>
|
|
|
+ </ws-form-item> -->
|
|
|
+ <ws-form-item label="自检员" span="1" prop="qualityInspector">
|
|
|
+ <el-select
|
|
|
+ v-model="dataList.warehouseInOutDetail.qualityInspector"
|
|
|
+ placeholder="请选择自检员"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ :filter-method="dataFilter"
|
|
|
+ @change="qualityInspectorChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in qualityInspectorList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.staffName"
|
|
|
+ :value="item.staffName"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
</div>
|
|
|
<div class="neifor">
|
|
|
<ws-info-table>
|
|
@@ -445,10 +464,13 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['deptBudgetList']),
|
|
|
+ ...mapGetters(['dataList']),
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ isSelectType:true,
|
|
|
+ isGetCost:false,
|
|
|
+ qualityInspectorList:[],
|
|
|
//弹出框
|
|
|
dialogViewSpareMoney: false,
|
|
|
dialogApproveFormVisible: false,
|
|
@@ -478,10 +500,10 @@ export default {
|
|
|
storageType: [],
|
|
|
deliveryType: [],
|
|
|
outContractNo: [],
|
|
|
+ outContractNo1: [],
|
|
|
// 提交类型
|
|
|
submitType: true,
|
|
|
typeList:['干粮','潮粮'],
|
|
|
- storageType: [],
|
|
|
appendixIdsAdd: '',
|
|
|
uploadSuccess: {},
|
|
|
warehouseInOutDetail: {},
|
|
@@ -569,27 +591,44 @@ export default {
|
|
|
this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
|
|
|
this.dataList.statusFlag = this.$route.statusFlag
|
|
|
this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
|
|
|
- this.deptBudgetList.warehouseType = this.$route.query.warehouseType
|
|
|
- this.deptBudgetList.createType = this.$route.query.createType
|
|
|
- this.dataList.temporaryOutType = this.$route.query.temporaryOutType
|
|
|
- this.dataList.cost=this.$route.query.cost
|
|
|
- this.dataList.freight=this.$route.query.freight
|
|
|
- this.dataList.type=this.$route.query.type
|
|
|
- this.dataList.buckleWeightRatio=this.$route.query.buckleWeightRatio
|
|
|
- this.dataList.tidalGrainWater=this.$route.query.tidalGrainWater
|
|
|
- this.dataList.solidGrainWater=this.$route.query.solidGrainWater
|
|
|
- this.dataList.pureWeight=this.$route.query.pureWeight
|
|
|
- this.dataList.deductionAmount=this.$route.query.deductionAmount
|
|
|
- this.dataList.deductionWeight=this.$route.query.deductionWeight
|
|
|
+ this.dataList.warehouseType = this.$route.query.warehouseType
|
|
|
+ this.dataList.createType = this.$route.query.createType
|
|
|
+ this.dataList.temporaryOutType = this.$route.query.temporaryOutType
|
|
|
+ this.dataList.cost=this.$route.query.cost
|
|
|
+ this.dataList.freight=this.$route.query.freight
|
|
|
+ this.dataList.type=this.$route.query.type
|
|
|
+ this.dataList.buckleWeightRatio=this.$route.query.buckleWeightRatio
|
|
|
+ this.dataList.tidalGrainWater=this.$route.query.tidalGrainWater
|
|
|
+ this.dataList.solidGrainWater=this.$route.query.solidGrainWater
|
|
|
+ this.dataList.pureWeight=this.$route.query.pureWeight
|
|
|
+ this.dataList.deductionAmount=this.$route.query.deductionAmount
|
|
|
+ this.dataList.deductionWeight=this.$route.query.deductionWeight
|
|
|
+ this.dataList.inOutTypeFlag=1
|
|
|
+ if(this.dataList.cost){
|
|
|
+ this.isGetCost = true
|
|
|
+ this.cost = this.dataList.cost
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
+ kkInput(val){
|
|
|
+ console.log(val)
|
|
|
+ if(this.isGetCost){
|
|
|
+ if(this.dataList.cost>val){
|
|
|
+ this.dataList.cost = this.cost - this.dataList.deductionAmount
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ qualityInspectorChange(e){
|
|
|
+ console.log(e)
|
|
|
+ },
|
|
|
uploadSuccessHandle1(res){
|
|
|
this.dataList.addressUrl=res.url
|
|
|
},
|
|
|
pureweight(status){
|
|
|
- console.log(this.deptBudgetList)
|
|
|
- if(this.deptBudgetList.netWeight&&this.deptBudgetList.tidalGrainWater&&this.deptBudgetList.solidGrainWater&&this.deptBudgetList.buckleWeightRatio){
|
|
|
- this.deptBudgetList.pureWeight=(this.deptBudgetList.netWeight*(100-(this.deptBudgetList.tidalGrainWater-this.deptBudgetList.solidGrainWater)*this.deptBudgetList.buckleWeightRatio))/100
|
|
|
+ console.log(this.dataList)
|
|
|
+ if(this.dataList.netWeight&&this.dataList.tidalGrainWater&&this.dataList.solidGrainWater&&this.dataList.buckleWeightRatio){
|
|
|
+ this.dataList.pureWeight=(this.dataList.netWeight*(100-(this.dataList.tidalGrainWater-this.dataList.solidGrainWater)*this.dataList.buckleWeightRatio))/100
|
|
|
}
|
|
|
},
|
|
|
//返回按钮
|
|
@@ -599,6 +638,7 @@ export default {
|
|
|
carChange(e){
|
|
|
for (let i = 0; i < this.tranCarInfoList.length; i++) {
|
|
|
if(this.tranCarInfoList[i].carNo==this.dataList.carNo){
|
|
|
+ this.dataList.tranCarNo=this.tranCarInfoList[i].tranCarNo
|
|
|
this.dataList.freight=this.tranCarInfoList[i].tranPrice
|
|
|
}
|
|
|
|
|
@@ -610,9 +650,33 @@ export default {
|
|
|
contractNoChange(e){
|
|
|
for (var i = 0; i < this.outContractNo.length; i++) {
|
|
|
if (this.outContractNo[i].contractNo == e) {
|
|
|
+ if (this.outContractNo[i].inOutType == '采购入库') {
|
|
|
+ this.dataList.inOutTypeKey = 1
|
|
|
+ } else if (this.outContractNo[i].inOutType == '移库入库') {
|
|
|
+ this.dataList.inOutTypeKey = 3
|
|
|
+ } else if (this.outContractNo[i].inOutType == '暂存入库') {
|
|
|
+ this.dataList.inOutTypeKey = 4
|
|
|
+ } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
|
|
|
+ this.dataList.inOutTypeKey = 5
|
|
|
+ } else if (this.detailData.inOutType == '退库') {
|
|
|
+ this.dataList.inOutTypeKey = 6
|
|
|
+ }
|
|
|
this.dataList.goodsName = this.outContractNo[i].goodsName
|
|
|
this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
|
|
|
- this.dataList.cost= this.outContractNo[i].contractPrice
|
|
|
+ this.cost = this.outContractNo[i].contractPrice
|
|
|
+ if(this.cost){
|
|
|
+ this.isGetCost = true
|
|
|
+ this.dataList.cost = this.cost - this.dataList.deductionAmount
|
|
|
+ }else{
|
|
|
+ this.isGetCost = false
|
|
|
+ this.dataList.cost = this.dataList.cost
|
|
|
+ }
|
|
|
+ this.dataList.inOutType = this.outContractNo[i].inOutType
|
|
|
+ if(this.outContractNo[i].inOutType=='移库入库'){
|
|
|
+ this.isSelectType = false
|
|
|
+ }else{
|
|
|
+ this.isSelectType = true
|
|
|
+ }
|
|
|
if(this.outContractNo[i].tranCarInfoList){
|
|
|
this.options2=this.outContractNo[i].tranCarInfoList
|
|
|
this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
|
|
@@ -623,7 +687,7 @@ export default {
|
|
|
},
|
|
|
dataFilter1(val) {
|
|
|
console.log(val)
|
|
|
- this.deptBudgetList.contractNo = val;
|
|
|
+ this.dataList.contractNo = val;
|
|
|
if (val) { //val存在
|
|
|
this.options1 = this.outContractNo1.filter((item) => {
|
|
|
if (!!~item.contractNo.indexOf(val) || !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())) {
|
|
@@ -635,7 +699,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
dataFilter2(val) {
|
|
|
- this.deptBudgetList.carNo = val;
|
|
|
+ this.dataList.carNo = val;
|
|
|
if (val) { //val存在
|
|
|
this.options1 = this.outContractNo1.filter((item) => {
|
|
|
if (!!~item.carNo.indexOf(val) || !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())) {
|
|
@@ -648,7 +712,7 @@ export default {
|
|
|
},
|
|
|
dataFilter(val) {
|
|
|
// console.log(val,"名")
|
|
|
- this.deptBudgetList.staffList = val
|
|
|
+ this.dataList.staffList = val
|
|
|
if (val) {
|
|
|
//val存在
|
|
|
this.options = this.staffList.filter((item) => {
|
|
@@ -665,6 +729,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
editClick(status){
|
|
|
+ this.isGetCost = false
|
|
|
if(status==1){
|
|
|
this.disabled1=!this.disabled1
|
|
|
}else{
|
|
@@ -674,7 +739,7 @@ export default {
|
|
|
selectstaff(e) {
|
|
|
for (var i = 0; i < this.staffList.length; i++) {
|
|
|
if (this.staffList[i].staffName == e) {
|
|
|
- this.deptBudgetList.personChargeKey = this.staffList[i].staffId
|
|
|
+ this.dataList.personChargeKey = this.staffList[i].staffId
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -685,7 +750,7 @@ export default {
|
|
|
confirmButtonText: '确定',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
- .then(() => {debugger
|
|
|
+ .then(() => {
|
|
|
this.$refs.dataList.validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
@@ -825,8 +890,8 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
if (
|
|
|
- this.deptBudgetList.type=='潮粮'&&this.dataList.solidGrainWater < 1 ||
|
|
|
- this.deptBudgetList.type=='潮粮'&&this.dataList.solidGrainWater > 40 ||
|
|
|
+ this.dataList.type=='潮粮'&&this.dataList.solidGrainWater < 1 ||
|
|
|
+ this.dataList.type=='潮粮'&&this.dataList.solidGrainWater > 40 ||
|
|
|
(this.dataList.type=='潮粮'&&String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
|
|
|
String(this.dataList.solidGrainWater).length -
|
|
|
(String(this.dataList.solidGrainWater).indexOf('.') + 1) >
|
|
@@ -1270,10 +1335,16 @@ export default {
|
|
|
})
|
|
|
// 类型
|
|
|
if (this.$route.query.warehouseType == '1') {
|
|
|
+ this.storageType = []
|
|
|
pullDown({ constId: 'CON5' })
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- this.storageType = response
|
|
|
+ // this.storageType = response
|
|
|
+ for(let i = 0;i<response.length;i++){
|
|
|
+ if(response[i].constValue=='移库入库'||response[i].constValue=='退库'){
|
|
|
+ this.storageType.push(response[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
} else if (this.$route.query.warehouseType == '2') {
|
|
|
//临时仓库入库类型
|
|
@@ -1290,16 +1361,24 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
//合同编号
|
|
|
- xialaNo({ compId: sessionStorage.getItem('ws-pf_compId') })
|
|
|
+ xialaNo({ compId: sessionStorage.getItem('ws-pf_compId'), flag: 6 })
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
+ this.options1 = response
|
|
|
this.outContractNo = response
|
|
|
})
|
|
|
+ //合同编号2
|
|
|
+ xialaNo({ compId: sessionStorage.getItem('ws-pf_compId'), flag: 7 })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.outContractNo1 = response
|
|
|
+ })
|
|
|
//经办人
|
|
|
getstaff({ compId: sessionStorage.getItem('ws-pf_compId'),warehouseId:this.dataList.id })
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
this.options = response
|
|
|
+ this.qualityInspectorList = response
|
|
|
this.staffList = response
|
|
|
// this.agent = response
|
|
|
})
|