|
@@ -38,7 +38,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="贸易方式" prop="ftrademodeid">
|
|
|
<el-input
|
|
|
- v-model="queryParams.ftrademodeid"
|
|
|
+ v-model="queryParams.frademodeid"
|
|
|
placeholder="请输入贸易方式"
|
|
|
clearable
|
|
|
size="small"
|
|
@@ -74,7 +74,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="货物名称" prop="fgoodsid">
|
|
|
<el-select
|
|
|
- v-model="queryParams.fgoodsid"
|
|
|
+ v-model="queryParams.fgoodsids"
|
|
|
placeholder="请选择货物名称"
|
|
|
clearable
|
|
|
size="small"
|
|
@@ -165,12 +165,12 @@
|
|
|
<el-table-column label="提单号" align="center" prop="fMblno" />
|
|
|
<el-table-column label="经营单位" align="center" prop="fSbu" />
|
|
|
<el-table-column
|
|
|
- label="入库日期"
|
|
|
+ label="出库日期"
|
|
|
align="center"
|
|
|
- prop="fcreatetime"
|
|
|
+ prop="createTime"
|
|
|
width="180"
|
|
|
><template slot-scope="scope">
|
|
|
- <span>{{ parseTime(scope.row.fcreatetime, "{y}-{m}-{d}") }}</span>
|
|
|
+ <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -181,10 +181,10 @@
|
|
|
/>
|
|
|
<el-table-column label="仓库" align="center" prop="fWarehouseid" />
|
|
|
|
|
|
- <el-table-column label="入库件数" align="center" prop="fQty" />
|
|
|
+ <el-table-column label="出库件数" align="center" prop="fQty" />
|
|
|
<!-- <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>-->
|
|
|
<!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
|
|
|
- <el-table-column label="入库毛重" align="center" prop="fgrossweight" />
|
|
|
+ <el-table-column label="出库毛重" align="center" prop="fGrossweight" />
|
|
|
|
|
|
<el-table-column label="净重" align="center" prop="fNetweight" />
|
|
|
|
|
@@ -207,6 +207,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
+ v-if="scope.row.fBillstatus !== '6'"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['warehouseBusiness:warehousebills:remove']"
|
|
|
>删除
|
|
@@ -238,14 +239,14 @@
|
|
|
>
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="货权方" prop="fCorpid">
|
|
|
+ <el-form-item label="原货权方" prop="fCorpid">
|
|
|
<el-select
|
|
|
v-model="form.fCorpid"
|
|
|
filterable
|
|
|
remote
|
|
|
style="width: 250px"
|
|
|
:remote-method="corpsRemoteMethod"
|
|
|
- placeholder="请选择货权方"
|
|
|
+ placeholder="请选择原货权方"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(dict,index) in fMblnoOptions"
|
|
@@ -328,8 +329,8 @@
|
|
|
placeholder="请选择仓库"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="dict in warehouseOptions"
|
|
|
- :key="dict.fId"
|
|
|
+ v-for="(dict,index) in warehouseOptions"
|
|
|
+ :key="index.fId"
|
|
|
:label="dict.fName"
|
|
|
:value="dict.fId"
|
|
|
></el-option>
|
|
@@ -508,7 +509,7 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="经营单位" prop="fsbu">
|
|
|
+ <el-form-item label="经营单位" prop="fSbu">
|
|
|
<el-select
|
|
|
v-model="form.fSbu"
|
|
|
filterable
|
|
@@ -518,8 +519,8 @@
|
|
|
placeholder="请选择经营单位"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="dict in fSbuOptions"
|
|
|
- :key="dict.fId"
|
|
|
+ v-for="(dict,index) in fSbuOptions"
|
|
|
+ :key="index.fId"
|
|
|
:label="dict.fName"
|
|
|
:value="dict.fId"
|
|
|
></el-option>
|
|
@@ -636,6 +637,7 @@
|
|
|
tooltip-effect="dark"
|
|
|
border
|
|
|
stripe
|
|
|
+ :summary-method="getSummaries"
|
|
|
show-summary
|
|
|
>
|
|
|
<el-table-column label="序号" type="index" width="80">
|
|
@@ -657,7 +659,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="fgoodsid"
|
|
|
+ prop="fGoodsid"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
width="140px"
|
|
@@ -665,8 +667,9 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-select
|
|
|
- v-model="scope.row.fGoodsid"
|
|
|
+ v-model="scope.row.fGoodsids"
|
|
|
filterable
|
|
|
+ disabled
|
|
|
remote
|
|
|
:remote-method="goodsRemoteMethod"
|
|
|
placeholder="请选择品名"
|
|
@@ -788,6 +791,7 @@
|
|
|
v-model="scope.row.fWarehouselocid"
|
|
|
filterable
|
|
|
remote
|
|
|
+ disabled
|
|
|
:remote-method="kqhouseRemoteMethod"
|
|
|
placeholder="请选择库区"
|
|
|
>
|
|
@@ -987,7 +991,7 @@
|
|
|
<el-table-column label="序号" type="index" width="80">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="fcorpid"
|
|
|
+ prop="fCorpid"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
width="180px"
|
|
@@ -1215,7 +1219,7 @@
|
|
|
<el-table-column label="序号" type="index" width="80">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="fcorpid"
|
|
|
+ prop="fCorpid"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
width="180px"
|
|
@@ -1825,6 +1829,9 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ fGrossweight: '',
|
|
|
+ fNetweight: '',
|
|
|
+ fQty: '',
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -1959,6 +1966,7 @@
|
|
|
form: {
|
|
|
fMblno: null,
|
|
|
fCorpid: null,
|
|
|
+ fTrademodeid: null,
|
|
|
fWarehouseid: null
|
|
|
},
|
|
|
// 表单校验
|
|
@@ -1983,6 +1991,9 @@
|
|
|
fTrademodeid: [
|
|
|
{ required: true, message: "请选择贸易方式", trigger: "blur" },
|
|
|
],
|
|
|
+ fSbu: [
|
|
|
+ { required: true, message: "请选择经营方式", trigger: "blur" },
|
|
|
+ ],
|
|
|
fStorekeeper: {
|
|
|
required: true,
|
|
|
message: "请输入仓管员",
|
|
@@ -2069,9 +2080,10 @@
|
|
|
// 添加list
|
|
|
addRelevant() {
|
|
|
let corpidStatus = typeof this.form.fCorpid === 'undefined' || this.form.fCorpid == null || this.form.fCorpid === ''
|
|
|
+ let ftrademodeids = typeof this.form.fTrademodeid === 'undefined' || this.form.fTrademodeid == null || this.form.fTrademodeid === ''
|
|
|
let warehouseidStatus = typeof this.form.fWarehouseid === 'undefined' || this.form.fWarehouseid == null || this.form.fWarehouseid === ''
|
|
|
- if (corpidStatus || warehouseidStatus) {
|
|
|
- this.$message({ message: '请维护货权方和仓库', type: 'warning' })
|
|
|
+ if (corpidStatus || warehouseidStatus || ftrademodeids) {
|
|
|
+ this.$message({ message: '请维护货权方、仓库、贸易方式', type: 'warning' })
|
|
|
return false
|
|
|
}
|
|
|
this.whgenlegList = []
|
|
@@ -2095,7 +2107,7 @@
|
|
|
fNetweight: null,
|
|
|
fQty: null,
|
|
|
fPackagespecs: null,
|
|
|
- fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
|
|
|
+ fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
|
|
|
fCntrno: this.dialogWhgenlegList[whgen].fCntrno,
|
|
|
fGoodsval: null,
|
|
|
fTruckno: null,
|
|
@@ -2159,6 +2171,7 @@
|
|
|
this.loading = true;
|
|
|
listWarehousebills(this.queryParams).then((response) => {
|
|
|
this.warehousebillsList = response.rows;
|
|
|
+ console.log(response.rows)
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
});
|
|
@@ -2168,6 +2181,8 @@
|
|
|
this.whgenlegParams.fMblno = this.form.fMblno
|
|
|
this.whgenlegParams.fCorpid = this.form.fCorpid
|
|
|
this.whgenlegParams.fWarehouseid = this.form.fWarehouseid
|
|
|
+ this.whgenlegParams.fTrademodeid = this.form.fTrademodeid
|
|
|
+
|
|
|
listWhgenleg(this.whgenlegParams).then(response => {
|
|
|
this.whgenlegList = response.rows
|
|
|
this.whgenlegTotal = response.total
|
|
@@ -2295,7 +2310,6 @@
|
|
|
this.reset();
|
|
|
const fId = row.fId || this.ids;
|
|
|
getWarehousebills(fId).then((response) => {
|
|
|
- console.log(response)
|
|
|
this.form = response.data.warehousebills;
|
|
|
// this.fMblnoOptions = []
|
|
|
this.fMblnoOptions = response.data.corps;
|
|
@@ -2308,6 +2322,17 @@
|
|
|
this.warehouseOptions = response.data.warehouse;
|
|
|
this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
|
|
|
this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
|
|
|
+ for (let list in this.dataList) {
|
|
|
+ this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
|
|
|
+ this.$set(this.dataList[list], 'fGoodsids', this.dataList[list].fGoodsid)
|
|
|
+ }
|
|
|
+ for (let dr in this.warehouseDrList) {
|
|
|
+ this.$set(this.warehouseDrList[dr], 'fFeeUnitid', this.warehouseDrList[dr].fFeeUnitid + "")
|
|
|
+ }
|
|
|
+ this.warehouseCrList = response.data.warehousebillsfeesCr
|
|
|
+ for (let cr in this.warehouseCrList) {
|
|
|
+ this.$set(this.warehouseCrList[cr], 'fFeeUnitid', this.warehouseCrList[cr].fFeeUnitid + "")
|
|
|
+ }
|
|
|
this.userOptions = response.data.sysUser;
|
|
|
this.goodsOptions = response.data.goodsList;
|
|
|
this.goodsOptions = response.data.goodsList
|
|
@@ -2320,7 +2345,7 @@
|
|
|
);
|
|
|
|
|
|
this.open = true;
|
|
|
- this.title = "修改出库)";
|
|
|
+ this.title = "修改出库";
|
|
|
});
|
|
|
},
|
|
|
// 数量计算
|
|
@@ -2357,8 +2382,58 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ // 合计
|
|
|
+ getSummaries (param) {
|
|
|
+ console.log(param)
|
|
|
+ const {columns, data} = param
|
|
|
+ const sums = []
|
|
|
+ var values = []
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (index === 0) {
|
|
|
+ sums[index] = '总价'
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (column.property === 'fgrossweight') {
|
|
|
+ values = data.map(item => Number(item['fGrossweight']))
|
|
|
+
|
|
|
+ }
|
|
|
+ if (column.property === 'fnetweight') {
|
|
|
+ values = data.map(item => Number(item['fNetweight']))
|
|
|
+ }
|
|
|
+ if (column.property === 'fqty') {
|
|
|
+ values = data.map(item => Number(item['fQty']))
|
|
|
+ }
|
|
|
+
|
|
|
+ // const values = data.map(item => Number(item[column.property]))
|
|
|
+ if (column.property === 'fgrossweight' || column.property === 'fnetweight' || column.property === 'fqty') {
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr)
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ if (column.property === 'fgrossweight') {
|
|
|
+ this.form.fGrossweight = prev + curr
|
|
|
+ }
|
|
|
+ if (column.property === 'fnetweight') {
|
|
|
+ this.form.fNetweight = prev + curr
|
|
|
+ }
|
|
|
+ if (column.property === 'fqty') {
|
|
|
+ this.form.fQty = prev + curr
|
|
|
+ }
|
|
|
+ return prev + curr
|
|
|
+ } else {
|
|
|
+ return prev
|
|
|
+ }
|
|
|
+ }, 0)
|
|
|
+ // sums[index]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.sums = sums
|
|
|
+ return sums
|
|
|
+
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
- submitForm() {
|
|
|
+ submitForm(status) {
|
|
|
+ console.log(this.form.fGrossweight)
|
|
|
+ console.log(this.dataList)
|
|
|
// if(typeof this.form.fBillstatus === 'undefined' || this.form.fBillstatus==null) {
|
|
|
// this.form.fBillstatus = 6;
|
|
|
// }
|
|
@@ -2386,6 +2461,12 @@
|
|
|
return false
|
|
|
}
|
|
|
}
|
|
|
+ for (let list in this.dataList) {
|
|
|
+ if (this.dataList[list].fQty === '') {
|
|
|
+ this.$message.error('请输入出库件数!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
for (let list in this.relevantAttachments) {
|
|
|
if (this.relevantAttachments[list].fName === null) {
|
|
|
this.$message.error('请输入附件名称!')
|
|
@@ -2407,6 +2488,7 @@
|
|
|
|
|
|
}
|
|
|
if (valid) {
|
|
|
+ this.form.fBillstatus = status;
|
|
|
let formData = new window.FormData();
|
|
|
// 附件数据
|
|
|
formData.append("tWarehouseBills", JSON.stringify(this.form));
|