|
@@ -44,8 +44,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="center">
|
|
|
- <el-table ref="tableData" :data="warehouseList.records" height="570"
|
|
|
- v-show="this.warehouseType== '1'" @selection-change="handleSelectionChange">
|
|
|
+ <el-table ref="tableData" :data="warehouseList.records" height="570" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column>
|
|
|
<el-table-column prop="warehouseReceipt" label="所属仓单" width="180">
|
|
|
</el-table-column>
|
|
@@ -80,42 +79,6 @@
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
- <el-table @selection-change="handleSelectionChange" :data="warehouseList.records" height="560"
|
|
|
- v-show="this.warehouseType== '2'">
|
|
|
- <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column>
|
|
|
- <el-table-column prop="warehouseReceipt" label="所属仓单" width="180">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="inOutTaskNo" label="业务编号" width="180">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="cargoRights" label="货源归属" width="180"> </el-table-column>
|
|
|
- <el-table-column prop="inOutType" label="入库类型" width="100"> </el-table-column>
|
|
|
- <el-table-column prop="carNo" label="车牌号">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span style="color: #8890b1">{{ scope.row.carNo }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="goodsName" label="货名"> </el-table-column>
|
|
|
- <el-table-column prop="netWeight" label="净重(吨)"></el-table-column>
|
|
|
- <el-table-column prop="pureWeight" label="纯重(吨)"> </el-table-column>
|
|
|
- <el-table-column label="水分(%)" span="1" prop="waterContent"></el-table-column>
|
|
|
- <el-table-column label="容重(g/l)" span="1" prop="bulkDensity"></el-table-column>
|
|
|
- <!-- <el-table-column prop="type" label="类型" width="60px"> </el-table-column> -->
|
|
|
- <el-table-column prop="cost" label="单价(元/吨)">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="price" label="粮款(元)"> </el-table-column>
|
|
|
-
|
|
|
- <!-- <el-table-column prop="inOutDate" label="入库日期" width="100px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span style="color: #8890b1">{{ scope.row.inOutDate }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column> -->
|
|
|
- <el-table-column prop="createDate" label="入库日期">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span style="color: #8890b1">{{ scope.row.createDate }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- </el-table>
|
|
|
|
|
|
|
|
|
<div style="text-align: center; padding: 10px">
|
|
@@ -235,15 +198,19 @@
|
|
|
accessoryTFs: false,
|
|
|
modification: [],
|
|
|
printList: [], //批量打印数据
|
|
|
- warehouseAllXiaLa:[]
|
|
|
+ warehouseAllXiaLa:[],
|
|
|
+ billNo:'',
|
|
|
+ db:{}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- activated() {
|
|
|
+ async activated() {
|
|
|
+ this.db=await global.default.openDB('warehouseReceipt')
|
|
|
this.deptBudgetList.baseId = this.$route.query.baseId
|
|
|
// this.deptBudgetList.positionId = this.$route.query.positionId
|
|
|
this.deptBudgetList.warehouseName = this.$route.query.warehouseName
|
|
|
this.remark = this.$route.query.remark
|
|
|
+ this.billNo = this.$route.query.billNo
|
|
|
// this.binNumber = this.$route.query.binNumber
|
|
|
this.capacity = this.$route.query.capacity
|
|
|
this.warehouseType = this.$route.query.warehouseType
|
|
@@ -271,16 +238,16 @@
|
|
|
this.$message.error("请选择相同货名的条目!")
|
|
|
return
|
|
|
}
|
|
|
- var db=await global.default.openDB('warehouseReceipt')
|
|
|
+
|
|
|
console.log(this.modification)
|
|
|
console.log()
|
|
|
- var data=await global.default.getDataByKey(db,'signalChat',1)
|
|
|
+ var data=await global.default.getDataByKey(this.db,'signalChat',2)
|
|
|
if(data){
|
|
|
- if(data.modification&&data.modification.length>0){
|
|
|
- global.default.updateDB(db,'signalChat',{sequenceId:1,modification:this.modification})
|
|
|
+ if(data.modification){
|
|
|
+ global.default.updateDB(this.db,'signalChat',{sequenceId:2,modification:this.modification})
|
|
|
}
|
|
|
}else{
|
|
|
- global.default.addData(db,'signalChat',{sequenceId:1,modification:this.modification})
|
|
|
+ global.default.addData(this.db,'signalChat',{sequenceId:2,modification:this.modification})
|
|
|
}
|
|
|
// localStorage.setItem('warehouseReceiptGood',this.modification)
|
|
|
this.$router.go(-1)
|
|
@@ -348,9 +315,12 @@
|
|
|
console.log("sfasa", this.modification)
|
|
|
},
|
|
|
selectInit(row) {
|
|
|
- if (row.binded ==0||!row.binded) {
|
|
|
+
|
|
|
+ if (row.warehouseReceipt == this.billNo||!row.warehouseReceipt) {
|
|
|
+ console.log(row.warehouseReceipt != this.billNo,this.billNo,1111111)
|
|
|
return true
|
|
|
} else {
|
|
|
+ console.log(row.warehouseReceipt != this.billNo,this.billNo,222222)
|
|
|
return false
|
|
|
}
|
|
|
},
|
|
@@ -455,7 +425,7 @@
|
|
|
// // this.newAppendixs = files
|
|
|
// this.onChangeFlag = true
|
|
|
},
|
|
|
- getList() {
|
|
|
+ async getList() {
|
|
|
|
|
|
var startDate=''
|
|
|
var endDate=''
|
|
@@ -463,7 +433,7 @@
|
|
|
startDate=this.value2[0]?this.value2[0]:''
|
|
|
endDate=this.value2[1]?this.value2[1]:''
|
|
|
}
|
|
|
-
|
|
|
+ var data=await global.default.getDataByKey(this.db,'signalChat',2)
|
|
|
if (this.warehouseType == 1) {
|
|
|
|
|
|
addselectinfoList({
|
|
@@ -485,15 +455,45 @@
|
|
|
.then((response) => {
|
|
|
for (var i = 0; i < response.records.length; i++) {
|
|
|
if (response.records[i].cost&&response.records[i].pureWeight) {
|
|
|
- response.records[i].price=response.records[i].cost*response.records[i].pureWeight
|
|
|
+ response.records[i].price=Number(response.records[i].cost*response.records[i].pureWeight).toFixed(2)
|
|
|
} else {
|
|
|
response.records[i].price=0
|
|
|
}
|
|
|
}
|
|
|
- this.deptCircularPage.currentPage = response.current
|
|
|
+ this.deptCircularPage.currentPage = response.current
|
|
|
this.deptCircularPage.pageSize = response.size
|
|
|
this.deptBudgetTotal = response.total
|
|
|
this.warehouseList = response
|
|
|
+ if(localStorage.getItem('warehouseReceipteditdata')||data.modification&&data.modification.length>0){
|
|
|
+
|
|
|
+
|
|
|
+ if(data&&data.modification&&data.modification.length>0){
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ for (let i = 0; i <data.modification.length; i++) {
|
|
|
+ var index=this.warehouseList.records.findIndex((item)=>{return item.id==data.modification[i].id})
|
|
|
+ this.$refs.tableData.toggleRowSelection(this.warehouseList.records[index],true)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ var modification1 = JSON.parse(localStorage.getItem('warehouseReceipteditdata')).warehouseInOutInfoList
|
|
|
+
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ for (let i = 0; i < this.warehouseList.records.length; i++) {
|
|
|
+ var index=modification1.findIndex((item)=>{return item.id==this.warehouseList.records[i].id})
|
|
|
+
|
|
|
+ if(index!=-1){
|
|
|
+ console.log(i)
|
|
|
+ this.$refs.tableData.toggleRowSelection(this.warehouseList.records[i],true)
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
})
|
|
|
} else if (this.warehouseType == 2) {
|
|
|
recordss({
|
|
@@ -523,6 +523,33 @@
|
|
|
this.deptCircularPage.pageSize = response.size
|
|
|
this.deptBudgetTotal = response.total
|
|
|
this.warehouseList = response
|
|
|
+ if(localStorage.getItem('warehouseReceipteditdata')||data.modification&&data.modification.length>0){
|
|
|
+ if(data&&data.modification&&data.modification.length>0){
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ for (let i = 0; i <data.modification.length; i++) {
|
|
|
+ var index=this.warehouseList.records.findIndex((item)=>{return item.id==data.modification[i].id})
|
|
|
+ this.$refs.tableData.toggleRowSelection(this.warehouseList.records[index],true)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ var modification1 = JSON.parse(localStorage.getItem('warehouseReceipteditdata')).warehouseInOutInfoList
|
|
|
+
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ for (let i = 0; i < this.warehouseList.records.length; i++) {
|
|
|
+ var index=modification1.findIndex((item)=>{return item.id==this.warehouseList.records[i].id})
|
|
|
+
|
|
|
+ if(index!=-1){
|
|
|
+ console.log(i)
|
|
|
+ this.$refs.tableData.toggleRowSelection(this.warehouseList.records[i],true)
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
}
|