|
@@ -248,8 +248,8 @@
|
|
|
placeholder="请选择货权方"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="dict in fMblnoOptions"
|
|
|
- :key="dict.fId"
|
|
|
+ v-for="(dict,index) in fMblnoOptions"
|
|
|
+ :key="index.fId"
|
|
|
:label="dict.fName"
|
|
|
:value="dict.fId"
|
|
|
></el-option>
|
|
@@ -552,7 +552,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="贸易方式" prop="ftrademodeid">
|
|
|
+ <el-form-item label="贸易方式" prop="fTrademodeid">
|
|
|
<el-select
|
|
|
v-model="form.fTrademodeid"
|
|
|
placeholder="请选择贸易方式"
|
|
@@ -655,15 +655,15 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-select
|
|
|
- v-model="scope.row.fGoodsid"
|
|
|
+ v-model="scope.row.fGoodsids"
|
|
|
filterable
|
|
|
remote
|
|
|
:remote-method="goodsRemoteMethod"
|
|
|
placeholder="请选择品名"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="dict in goodsOptions"
|
|
|
- :key="dict.fId"
|
|
|
+ v-for="(dict,index) in goodsOptions"
|
|
|
+ :key="index.fId"
|
|
|
:label="dict.fName"
|
|
|
:value="dict.fId"
|
|
|
></el-option>
|
|
@@ -765,13 +765,29 @@
|
|
|
align="center"
|
|
|
label="库区"
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
<el-input
|
|
|
oninput="value=value.replace(/[^\d.]/g,'')"
|
|
|
v-model="scope.row.fWarehouselocid"
|
|
|
placeholder="库区"
|
|
|
show-word-limit
|
|
|
/>
|
|
|
+ </template> -->
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.fWarehouselocid"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ :remote-method="kqhouseRemoteMethod"
|
|
|
+ placeholder="请选择库区"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in kqhouseOptions"
|
|
|
+ :key="dict.fId"
|
|
|
+ :label="dict.fName"
|
|
|
+ :value="dict.fId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -1215,8 +1231,8 @@
|
|
|
placeholder="客户名称"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="dict in KHblnoOptions"
|
|
|
- :key="dict.fId"
|
|
|
+ v-for="(dict, index) in KHblnoOptions"
|
|
|
+ :key="index.fId"
|
|
|
:label="dict.fName"
|
|
|
:value="dict.fId"
|
|
|
></el-option>
|
|
@@ -1423,7 +1439,7 @@
|
|
|
size="mini"
|
|
|
prop="打印"
|
|
|
@click="showEditDialog_s"
|
|
|
- >入库单
|
|
|
+ >出库单
|
|
|
</el-button>
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
@@ -1786,6 +1802,8 @@
|
|
|
|
|
|
import { listWarehouse } from "@/api/basicdata/warehouse";
|
|
|
|
|
|
+ import { listArea } from "@/api/basicdata/area";
|
|
|
+
|
|
|
import { listGoods } from "@/api/basicdata/goods";
|
|
|
|
|
|
import { listUser, queryUserVal } from "@/api/system/user";
|
|
@@ -1855,6 +1873,7 @@
|
|
|
deptOptions: [],
|
|
|
// 仓库(仓库数据)
|
|
|
warehouseOptions: [],
|
|
|
+ kqhouseOptions: [],
|
|
|
// 贸易方式(数据字典),对应t_trademodels 字典
|
|
|
fTrademodeidOptions: [],
|
|
|
// 计费单位(数据字典),下拉选择毛重或净重字典
|
|
@@ -1955,6 +1974,9 @@
|
|
|
fBsdate: [
|
|
|
{ required: true, message: "请选择业务日期", trigger: "blur" },
|
|
|
],
|
|
|
+ fTrademodeid: [
|
|
|
+ { required: true, message: "请选择贸易方式", trigger: "blur" },
|
|
|
+ ],
|
|
|
fStorekeeper: {
|
|
|
required: true,
|
|
|
message: "请输入仓管员",
|
|
@@ -2054,14 +2076,15 @@
|
|
|
},
|
|
|
// 库存总账导出数据
|
|
|
whgenlegData () {
|
|
|
+ console.log(this.dialogWhgenlegList)
|
|
|
for (let whgen in this.dialogWhgenlegList) {
|
|
|
this.dataList.push({
|
|
|
fMblno: this.dialogWhgenlegList[whgen].fMblno,
|
|
|
- fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
|
|
|
+ fGoodsid: this.dialogWhgenlegList[whgen].fGoodsids,
|
|
|
fCntrtype: null,
|
|
|
fQtyblc: this.dialogWhgenlegList[whgen].fQtyblc,
|
|
|
fWarehouseLocationids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
|
|
|
- fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
|
|
|
+ fGoodsids: this.dialogWhgenlegList[whgen].fGoodsid,
|
|
|
fgrossweight: null,
|
|
|
fNetweight: null,
|
|
|
fQty: null,
|
|
@@ -2259,7 +2282,7 @@
|
|
|
this.warehouseCrList = [];
|
|
|
this.warehouseDrList = [];
|
|
|
this.relevantAttachments = []
|
|
|
- this.title = "入库单";
|
|
|
+ this.title = "出库单";
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
@@ -2267,12 +2290,21 @@
|
|
|
const fId = row.fId || this.ids;
|
|
|
getWarehousebills(fId).then((response) => {
|
|
|
this.form = response.data.warehousebills;
|
|
|
- this.fMblnoOptions = []
|
|
|
+ // this.fMblnoOptions = []
|
|
|
this.fMblnoOptions = response.data.corps;
|
|
|
- this.dataList = response.data.goodsList;
|
|
|
+ this.KHblnoOptions = response.data.corps;
|
|
|
+ this.dataList = response.data.warehouseBillsItem;
|
|
|
this.relevantAttachments = response.data.enclosures;
|
|
|
this.warehouseDrList = response.data.warehousebillsfeesDr;
|
|
|
this.warehouseCrList = response.data.warehousebillsfeesCr;
|
|
|
+ this.warehouseOptions = response.data.warehouse;
|
|
|
+ this.userOptions = response.data.sysUser;
|
|
|
+ this.goodsOptions = response.data.goodsList;
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ "fBsdate",
|
|
|
+ Date.parse(response.data.warehousebills.fBsdate)
|
|
|
+ );
|
|
|
// this.$set(this.form, "fCorpid", response.data.corps[0].fName);
|
|
|
// this.$set(this.form, "fStltypeid", response.data.corps[0].fName);
|
|
|
// this.$set(this.form, "fCorpid", response.data.warehousebills.fcorpid);
|
|
@@ -2430,10 +2462,48 @@
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
+ console.log(this.dataList)
|
|
|
if(typeof this.form.fBillstatus === 'undefined' || this.form.fBillstatus==null) {
|
|
|
this.form.fBillstatus = 6;
|
|
|
}
|
|
|
+
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
+ if (this.dataList.length === 0) {
|
|
|
+ this.$message.error('请添加库存明细!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (this.relevantAttachments.length === 0) {
|
|
|
+ this.$message.error('请添加附件上传!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (this.warehouseDrList.length === 0) {
|
|
|
+ this.$message.error('请添加收款信息!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (this.warehouseCrList.length === 0) {
|
|
|
+ this.$message.error('请添加付款信息!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ for (let list in this.relevantAttachments) {
|
|
|
+ if (this.relevantAttachments[list].fName === null) {
|
|
|
+ this.$message.error('请输入附件名称!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let list in this.warehouseDrList) {
|
|
|
+ if (!this.warehouseDrList[list].fCorpid) {
|
|
|
+ this.$message.error('请选择客户名称')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ for (let list in this.warehouseCrList) {
|
|
|
+ if (!this.warehouseDrList[list].fCorpid) {
|
|
|
+ this.$message.error('请选择客户名称')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
if (valid) {
|
|
|
let formData = new window.FormData();
|
|
|
// 附件数据
|
|
@@ -2553,15 +2623,21 @@
|
|
|
});
|
|
|
},
|
|
|
/* 远程模糊查询库区 */
|
|
|
- // warehouseRemoteMethod(name) {
|
|
|
- // if (name == null || name === "") {
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- // let queryParams = { pageNum: 1, pageSize: 10, fName: name};
|
|
|
- // listWarehouse(queryParams).then((response) => {
|
|
|
- // this.warehouseOptions = response.rows;
|
|
|
- // });
|
|
|
- // },
|
|
|
+ kqhouseRemoteMethod(name) {
|
|
|
+ if (name == null || name === "") {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (!this.form.fWarehouseid) {
|
|
|
+ this.$message.error('请输入仓库!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ let queryParams = { pageNum: 1, pageSize: 10, fWarehouseid:this.form.fWarehouseid , fName: name };
|
|
|
+ listArea(queryParams).then((response) => {
|
|
|
+ console.log(response);
|
|
|
+ this.kqhouseOptions = response.rows;
|
|
|
+ });
|
|
|
+ },
|
|
|
/* 远程模糊查询操作用户 */
|
|
|
userRemoteMethod(name) {
|
|
|
if (name == null || name === "") {
|