|
@@ -108,7 +108,7 @@
|
|
|
filterable clearable
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in moveTaskNo"
|
|
|
+ v-for="item in contractNoList"
|
|
|
:key="item.constKey"
|
|
|
:label="item.contractNo"
|
|
|
:value="item.contractNo"
|
|
@@ -124,23 +124,11 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<!-- 货名 -->
|
|
|
- <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-form-item>
|
|
|
+ <!-- <el-form-item label="货源" class="huom">
|
|
|
+ <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-form-item> -->
|
|
|
<!--重量(吨)-->
|
|
|
<el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
|
|
|
<el-input
|
|
@@ -324,23 +312,18 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<!-- 货名 -->
|
|
|
- <el-form-item label="货名" class="huom">
|
|
|
- <el-select
|
|
|
- :disabled="dataList.taskTypeKey != 3"
|
|
|
- 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-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" />
|
|
|
+ <el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
|
|
|
+ </el-form-item> -->
|
|
|
<!--重量(吨)-->
|
|
|
<el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
|
|
|
<el-input
|
|
@@ -530,23 +513,11 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<!-- 货名 -->
|
|
|
- <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-form-item>
|
|
|
+ <!-- <el-form-item label="货源" class="huom">
|
|
|
+ <el-input disabled v-model="goods" placeholder="请选择货源"
|
|
|
+ maxlength="120" size="small" class="huom" />
|
|
|
+ <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="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
|
|
|
<el-input
|
|
@@ -697,6 +668,7 @@ export default {
|
|
|
dialogApproveFormVisible: false,
|
|
|
// 船舶类型
|
|
|
monetaryKey: null,
|
|
|
+ goods:'',
|
|
|
// 表格显示数据
|
|
|
tableDate: [],
|
|
|
// 是否显示
|
|
@@ -757,8 +729,8 @@ export default {
|
|
|
contractList: [],
|
|
|
inOutTaskNo: '',
|
|
|
inOutTaskNo1: '',
|
|
|
- dataList: { taskTypeKey: '1' },
|
|
|
- dataList1: { taskTypeKey: '1' },
|
|
|
+ dataList: { taskTypeKey: '1' ,weight:0},
|
|
|
+ dataList1: { taskTypeKey: '1' ,weight:0},
|
|
|
historyList: [],
|
|
|
pickerBeginDateBefore: {
|
|
|
disabledDate: time => {
|
|
@@ -772,7 +744,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
activated() {
|
|
|
+ this.dataList.weight=0
|
|
|
+ this.dataList1.weight=0
|
|
|
this.getList()
|
|
|
+ var num=0
|
|
|
+ this.sourceId=''
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
//返回按钮
|
|
@@ -781,8 +758,30 @@ export default {
|
|
|
},
|
|
|
returnsales() {
|
|
|
this.$router.go(-1)
|
|
|
+ localStorage.removeItem('supplygoods1')
|
|
|
this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
|
|
|
},
|
|
|
+ supplygoods(){
|
|
|
+ if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
|
+ if(this.dataList.warehouseName){
|
|
|
+ this.$router.push({name:'supplyofgoodsedit',query:{list:JSON.stringify(this.dataList.sourceRelationInfoList)}})
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: '请先选择仓库',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }else if(this.dataList1.taskTypeKey==2&&dataList1.inOutType=="退库"||this.dataList1.taskTypeKey==3){
|
|
|
+ if(this.dataList1.moveTaskNo||this.dataList1.contractNo){
|
|
|
+ this.$router.push({name:'outsupplyofgoodsedit',query:{list:JSON.stringify(this.dataList.sourceRelationInfoList)}})
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: '请先选择合同/移库编号',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取当前年月日
|
|
|
getdate() {
|
|
|
var date = new Date()
|
|
@@ -940,6 +939,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
requestadd(list, status) {
|
|
|
+ localStorage.removeItem('supplygoods1')
|
|
|
list.compId = localStorage.getItem('ws-pf_compId')
|
|
|
list.publisher =
|
|
|
localStorage.getItem('ws-pf_roleName') +
|
|
@@ -1396,6 +1396,13 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ var data=JSON.parse(localStorage.getItem("supplygoods"))
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ data[i].sourceId=data[i].id
|
|
|
+ }
|
|
|
+ var supplygoods=data
|
|
|
+ this.dataList.sourceRelationInfoList=supplygoods
|
|
|
+ this.dataList1.sourceRelationInfoList=supplygoods
|
|
|
this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
|
|
|
if (this.dataList.taskTypeKey == 3) {
|
|
|
this.dataList.businessDescribe = this.dataList1.businessDescribe
|
|
@@ -1557,6 +1564,8 @@ export default {
|
|
|
if (response.length > 1) {
|
|
|
this.dataList = response[0]
|
|
|
this.dataList1 = response[1]
|
|
|
+
|
|
|
+
|
|
|
console.log(this.dataList1.inOutTaskNo, '入库任务')
|
|
|
} else {
|
|
|
if (response[0].taskTypeKey == 3) {
|
|
@@ -1575,6 +1584,57 @@ export default {
|
|
|
// this.dataList = response[0]
|
|
|
}
|
|
|
}
|
|
|
+ this.goods=''
|
|
|
+ if(this.dataList.sourceRelationInfoList){
|
|
|
+ for (let i = 0; i < this.dataList.sourceRelationInfoList.length; i++) {
|
|
|
+ if(this.dataList.taskTypeKey==2&&this.dataList.inOutType=="退库"||this.dataList.taskTypeKey==4){
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
|
+ this.goods=this.goods!=''?this.goods+',':''+this.dataList.sourceRelationInfoList[i].goodsName
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(localStorage.getItem("supplygoods1")){
|
|
|
+ this.goods=''
|
|
|
+ this.dataList1.weight=0
|
|
|
+ this.dataList.weight=0
|
|
|
+ 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++) {
|
|
|
+ console.log(this.goods)
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // if(localStorage.getItem("supplygoods1")){
|
|
|
+ // this.goods=''
|
|
|
+ // this.dataList1.weight=0
|
|
|
+ // this.dataList.weight=0
|
|
|
+ // 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)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
})
|
|
|
} else {
|
|
|
this.tasknumber()
|