|
@@ -68,11 +68,8 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 货名 -->
|
|
<!-- 货名 -->
|
|
<!-- <el-form-item label="货源" class="huom">
|
|
<!-- <el-form-item label="货源" class="huom">
|
|
- <el-select :disabled="dataList.taskTypeKey != 3" v-model="dataList.goodsName" placeholder="货源"
|
|
|
|
- class="huom" @change="selectgoodsName" filterable clearable>
|
|
|
|
- <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
|
|
|
|
- :value="item.constValue"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <el-input disabled v-model="goods" placeholder="请选择货源"
|
|
|
|
+ maxlength="120" size="small" class="huom" />
|
|
<el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
|
|
<el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
<!--重量(吨)-->
|
|
<!--重量(吨)-->
|
|
@@ -171,16 +168,18 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 货名 -->
|
|
<!-- 货名 -->
|
|
- <!--<el-form-item label="货源" class="huom">
|
|
|
|
- <el-select :disabled="dataList.taskTypeKey != 3 || dataList.taskTypeKey == 3" filterable clearable
|
|
|
|
- v-model="dataList.goodsName" placeholder="货名" class="huom" @change="selectgoodsName1">
|
|
|
|
- <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
|
|
|
|
- :value="item.constValue"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- <el-input disabled v-model="dataList.sourceId" placeholder="请选择货源"
|
|
|
|
|
|
+ <!-- <el-form-item v-if='dataList1.inOutType!="退库"&&dataList1.taskTypeKey == 2' label="货名" class="huom">
|
|
|
|
+ <el-select disabled v-model="dataList1.goodsName" placeholder="货名" class="huom" @change="selectgoodsName1"
|
|
|
|
+ filterable clearable>
|
|
|
|
+ <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
|
|
|
|
+ :value="item.constValue"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-else label="货源" class="huom">
|
|
|
|
+ <el-input disabled v-model="goods" placeholder="请选择货源"
|
|
maxlength="120" size="small" class="huom" />
|
|
maxlength="120" size="small" class="huom" />
|
|
<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
|
|
<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
|
|
- </el-form-item>-->
|
|
|
|
|
|
+ </el-form-item> -->
|
|
<!--重量(吨)-->
|
|
<!--重量(吨)-->
|
|
<el-form-item label="重量(吨)">
|
|
<el-form-item label="重量(吨)">
|
|
<el-input @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
|
|
<el-input @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
|
|
@@ -283,15 +282,10 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 货名 -->
|
|
<!-- 货名 -->
|
|
<!-- <el-form-item label="货源" class="huom">
|
|
<!-- <el-form-item label="货源" class="huom">
|
|
- <el-select :disabled="dataList.taskTypeKey != 3" v-model="dataList.goodsName" placeholder="货名"
|
|
|
|
- class="huom" @change="selectgoodsName " filterable clearable>
|
|
|
|
- <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
|
|
|
|
- :value="item.constValue"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- <el-input disabled v-model="dataList.sourceId" placeholder="请选择货源"
|
|
|
|
|
|
+ <el-input disabled v-model="goods" placeholder="请选择货源"
|
|
maxlength="120" size="small" class="huom" />
|
|
maxlength="120" size="small" class="huom" />
|
|
- <el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
|
|
|
|
- </el-form-item>-->
|
|
|
|
|
|
+ <el-button class="bg-bottom" v-if='dataList.taskTypeKey!=4' type="primary" size="small" @click="supplygoods()">选择货源</el-button>
|
|
|
|
+ </el-form-item> -->
|
|
<!--重量(吨)-->
|
|
<!--重量(吨)-->
|
|
<el-form-item label="重量(吨)">
|
|
<el-form-item label="重量(吨)">
|
|
<el-input :disabled="dataList.taskTypeKey == 4" v-model="dataList.weight" placeholder="请输入重量(吨)"
|
|
<el-input :disabled="dataList.taskTypeKey == 4" v-model="dataList.weight" placeholder="请输入重量(吨)"
|
|
@@ -473,6 +467,7 @@
|
|
}]
|
|
}]
|
|
},
|
|
},
|
|
size: 10,
|
|
size: 10,
|
|
|
|
+ goods:'',
|
|
compId: localStorage.getItem('ws-pf_compId'),
|
|
compId: localStorage.getItem('ws-pf_compId'),
|
|
deptCircularPage: {},
|
|
deptCircularPage: {},
|
|
packtypeList: {},
|
|
packtypeList: {},
|
|
@@ -485,11 +480,13 @@
|
|
inOutTaskNo1: '',
|
|
inOutTaskNo1: '',
|
|
sourceId:'',
|
|
sourceId:'',
|
|
dataList: {
|
|
dataList: {
|
|
- taskTypeKey: '1'
|
|
|
|
|
|
+ taskTypeKey: '1',
|
|
|
|
+ weight:0,
|
|
},
|
|
},
|
|
dataList1: {
|
|
dataList1: {
|
|
taskTypeKey: '1',
|
|
taskTypeKey: '1',
|
|
- inOutType: ''
|
|
|
|
|
|
+ inOutType: '',
|
|
|
|
+ weight:0,
|
|
},
|
|
},
|
|
historyList: [],
|
|
historyList: [],
|
|
pickerBeginDateBefore: {
|
|
pickerBeginDateBefore: {
|
|
@@ -503,16 +500,31 @@
|
|
},
|
|
},
|
|
activated() {
|
|
activated() {
|
|
this.getList()
|
|
this.getList()
|
|
- var goods=''
|
|
|
|
var num=0
|
|
var num=0
|
|
this.sourceId=''
|
|
this.sourceId=''
|
|
- if(localStorage.setItem("supplygoods")){
|
|
|
|
- var supplygoods=JSON.parse(localStorage.setItem("supplygoods"))
|
|
|
|
- for (let i = 0; i < supplygoods.length; i++) {
|
|
|
|
- goods+=supplygoods[i].goodsName
|
|
|
|
- this.sourceId=this.sourceId+','+supplygoods[i].id
|
|
|
|
- num+=supplygoods[i].outWeight
|
|
|
|
|
|
+ this.dataList.weight=0
|
|
|
|
+ this.dataList1.weight=0
|
|
|
|
+ if(localStorage.getItem("supplygoods1")){
|
|
|
|
+ if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=="退库"||this.dataList.taskTypeKey==4){
|
|
|
|
+ var supplygoods=JSON.parse(localStorage.getItem("supplygoods1"))
|
|
|
|
+ for (let i = 0; i < supplygoods.length; i++) {
|
|
|
|
+ for (let q = 0; q < supplygoods[i].sourceRelationInfoList.length; q++) {
|
|
|
|
+ if(this.goods.indexOf(supplygoods[i].sourceRelationInfoList[q].goodsName)==-1){
|
|
|
|
+ this.goods=this.goods!=''?this.goods+',':''+supplygoods[i].sourceRelationInfoList[q].goodsName
|
|
|
|
+ }
|
|
|
|
+ this.dataList1.weight=Number(this.dataList1.weight)+Number(supplygoods[i].sourceRelationInfoList[q].surplusWeight)
|
|
|
|
+ this.dataList.weight=Number(this.dataList.weight)+Number(supplygoods[i].sourceRelationInfoList[q].surplusWeight)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
|
|
+ var supplygoods=JSON.parse(localStorage.getItem("supplygoods1"))
|
|
|
|
+ for (let i = 0; i < supplygoods.length; i++) {
|
|
|
|
+ this.goods=this.goods!=''?this.goods+',':''+supplygoods[i].goodsName
|
|
|
|
+ this.dataList1.weight=Number(this.dataList1.weight)+Number(supplygoods[i].estimateOutWarehouseWeight)
|
|
|
|
+ this.dataList.weight=Number(this.dataList.weight)+Number(supplygoods[i].estimateOutWarehouseWeight)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
@@ -522,27 +534,32 @@
|
|
this.$router.go(-1)
|
|
this.$router.go(-1)
|
|
},
|
|
},
|
|
supplygoods(){
|
|
supplygoods(){
|
|
- if(this.dataList.warehouseName){
|
|
|
|
- if(this.dataList.taskTypeKey==4){
|
|
|
|
- this.$router.push({name:'outsupplyofgoods',query:{baseId:this.baseId}})
|
|
|
|
- }else{
|
|
|
|
|
|
+ if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
|
|
+ if(this.dataList.warehouseName){
|
|
this.$router.push({name:'supplyofgoods',query:{baseId:this.baseId}})
|
|
this.$router.push({name:'supplyofgoods',query:{baseId:this.baseId}})
|
|
|
|
+ }else{
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请先选择仓库',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }else if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=="退库"||this.dataList1.taskTypeKey==3){
|
|
|
|
+ if(this.dataList1.moveTaskNo||this.dataList1.contractNo){
|
|
|
|
+ this.$router.push({name:'outsupplyofgoods',query:{contractNo:this.dataList1.contractNo}})
|
|
|
|
+ }else{
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请先选择合同/移库编号',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
- this.$message({
|
|
|
|
- message: '请先选择仓库',
|
|
|
|
- type: 'warning'
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
returnsales() {
|
|
returnsales() {
|
|
this.dataList = {
|
|
this.dataList = {
|
|
taskTypeKey: 1
|
|
taskTypeKey: 1
|
|
}
|
|
}
|
|
- this.$router.push({
|
|
|
|
- path: 'tranManagementWarehouseInOuttask'
|
|
|
|
- })
|
|
|
|
|
|
+ localStorage.removeItem('supplygoods1')
|
|
|
|
+ this.$router.go(-1)
|
|
},
|
|
},
|
|
// 获取当前年月日
|
|
// 获取当前年月日
|
|
getdate() {
|
|
getdate() {
|
|
@@ -746,6 +763,7 @@
|
|
},
|
|
},
|
|
changecontract1(e) {
|
|
changecontract1(e) {
|
|
if (this.dataList1.taskTypeKey != 3) {
|
|
if (this.dataList1.taskTypeKey != 3) {
|
|
|
|
+
|
|
for (let i = 0; i < this.contractNoList.length; i++) {
|
|
for (let i = 0; i < this.contractNoList.length; i++) {
|
|
if (this.contractNoList[i].contractNo == e) {
|
|
if (this.contractNoList[i].contractNo == e) {
|
|
if(this.contractNoList[i].priceType == '随行就市'){
|
|
if(this.contractNoList[i].priceType == '随行就市'){
|
|
@@ -765,7 +783,12 @@
|
|
this.$set(this.dataList1, 'gradeKey', response.gradeKey)
|
|
this.$set(this.dataList1, 'gradeKey', response.gradeKey)
|
|
this.$set(this.dataList1, 'waterContent', response.waterContent)
|
|
this.$set(this.dataList1, 'waterContent', response.waterContent)
|
|
this.$set(this.dataList1, 'bulkDensity', response.bulkDensity)
|
|
this.$set(this.dataList1, 'bulkDensity', response.bulkDensity)
|
|
- this.$set(this.dataList1, 'weight', response.weight)
|
|
|
|
|
|
+ if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=="退库"){
|
|
|
|
+ this.goods=''
|
|
|
|
+ this.dataList1.weight=0
|
|
|
|
+ }else{
|
|
|
|
+ this.$set(this.dataList1, 'weight', response.weight)
|
|
|
|
+ }
|
|
this.$set(
|
|
this.$set(
|
|
this.dataList1,
|
|
this.dataList1,
|
|
'unitPrice',
|
|
'unitPrice',
|
|
@@ -791,6 +814,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
requestadd(list, status) {
|
|
requestadd(list, status) {
|
|
|
|
+ localStorage.removeItem('supplygoods1')
|
|
list.compId = localStorage.getItem('ws-pf_compId')
|
|
list.compId = localStorage.getItem('ws-pf_compId')
|
|
list.publisher =
|
|
list.publisher =
|
|
localStorage.getItem('ws-pf_roleName') +
|
|
localStorage.getItem('ws-pf_roleName') +
|
|
@@ -1381,11 +1405,19 @@
|
|
// this.dataList.baseId =
|
|
// this.dataList.baseId =
|
|
this.dataList.inOutFlag = 1
|
|
this.dataList.inOutFlag = 1
|
|
this.dataList1.inOutFlag = 2
|
|
this.dataList1.inOutFlag = 2
|
|
|
|
+ var data=JSON.parse(localStorage.getItem("supplygoods"))
|
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
|
+ data[i].sourceId=data[i].id
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ var supplygoods=data
|
|
if (this.dataList.taskTypeKey == 1) {
|
|
if (this.dataList.taskTypeKey == 1) {
|
|
this.dataList.inOutTaskNo = this.inOutTaskNo
|
|
this.dataList.inOutTaskNo = this.inOutTaskNo
|
|
|
|
+ this.dataList.sourceRelationInfoList=supplygoods
|
|
this.requestadd(this.dataList)
|
|
this.requestadd(this.dataList)
|
|
} else if (this.dataList1.taskTypeKey == 2) {
|
|
} else if (this.dataList1.taskTypeKey == 2) {
|
|
this.dataList1.inOutTaskNo = this.inOutTaskNo1
|
|
this.dataList1.inOutTaskNo = this.inOutTaskNo1
|
|
|
|
+ this.dataList1.sourceRelationInfoList=supplygoods
|
|
this.requestadd(this.dataList1)
|
|
this.requestadd(this.dataList1)
|
|
} else if (
|
|
} else if (
|
|
this.dataList.taskTypeKey == 3 ||
|
|
this.dataList.taskTypeKey == 3 ||
|
|
@@ -1393,6 +1425,8 @@
|
|
) {
|
|
) {
|
|
this.dataList.inOutTaskNo = this.inOutTaskNo
|
|
this.dataList.inOutTaskNo = this.inOutTaskNo
|
|
this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
|
|
this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
|
|
|
|
+ this.dataList.sourceRelationInfoList=supplygoods
|
|
|
|
+ this.dataList1.sourceRelationInfoList=supplygoods
|
|
if (this.dataList.taskTypeKey == 3) {
|
|
if (this.dataList.taskTypeKey == 3) {
|
|
this.dataList.sendWarehouse=this.dataList.warehouseName
|
|
this.dataList.sendWarehouse=this.dataList.warehouseName
|
|
this.dataList.receiveWarehouse=this.dataList1.warehouseName
|
|
this.dataList.receiveWarehouse=this.dataList1.warehouseName
|