|
@@ -811,7 +811,7 @@
|
|
|
</el-date-picker>
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fGoodsid'">
|
|
|
- {{ scope.row.fGoodsid }}
|
|
|
+ {{ scope.row.fGoodsid|goodsFormat(goodsOptions) }}
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fBusinessType'">
|
|
|
<el-select
|
|
@@ -1845,6 +1845,7 @@
|
|
|
</el-table>
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
+
|
|
|
<el-dialog
|
|
|
title="在库物资"
|
|
|
:modal="false"
|
|
@@ -1853,11 +1854,81 @@
|
|
|
width="70%"
|
|
|
@close="init2()"
|
|
|
>
|
|
|
- <el-form
|
|
|
- ref="whgenlegParams"
|
|
|
- :model="whgenlegParams"
|
|
|
- label-width="120px"
|
|
|
+ <el-dialog
|
|
|
+ title="自定义列显示"
|
|
|
+ :visible.sync="showSetting2"
|
|
|
+ width="700px"
|
|
|
+ v-dialogDrag
|
|
|
+ append-to-body
|
|
|
>
|
|
|
+ <template slot="title">
|
|
|
+ <div class="avue-crud__dialog__header">
|
|
|
+ <span class="el-dialog__title">
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ display: inline-block;
|
|
|
+ width: 3px;
|
|
|
+ height: 20px;
|
|
|
+ margin-right: 5px;
|
|
|
+ float: left;
|
|
|
+ margin-top: 2px;
|
|
|
+ "
|
|
|
+ ></span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div>配置排序列数据(拖动调整顺序)</div>
|
|
|
+ <div style="margin-left: 17px">
|
|
|
+ <el-checkbox
|
|
|
+ v-model="allCheck2"
|
|
|
+ label="全选"
|
|
|
+ @change="allChecked2"
|
|
|
+ ></el-checkbox>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 4px; display: flex; justify-content: center">
|
|
|
+ <draggable
|
|
|
+ v-model="setRowList2"
|
|
|
+ group="site"
|
|
|
+ animation="300"
|
|
|
+ @start="onStart"
|
|
|
+ @end="onEnd"
|
|
|
+ handle=".indraggable"
|
|
|
+ >
|
|
|
+ <transition-group>
|
|
|
+ <div
|
|
|
+ v-for="item in setRowList2"
|
|
|
+ :key="item.surface"
|
|
|
+ class="listStyle"
|
|
|
+ >
|
|
|
+ <div style="width: 500px" class="indraggable">
|
|
|
+ <div class="progress" :style="{ width: item.width + 'px' }">
|
|
|
+ <el-checkbox
|
|
|
+ :label="item.name"
|
|
|
+ v-model="item.checked"
|
|
|
+ :true-label="0"
|
|
|
+ :false-label="1"
|
|
|
+ >{{ item.name }}
|
|
|
+ </el-checkbox>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-input-number
|
|
|
+ v-model.number="item.width"
|
|
|
+ controls-position="right"
|
|
|
+ :min="1"
|
|
|
+ :max="500"
|
|
|
+ size="mini"
|
|
|
+ ></el-input-number>
|
|
|
+ </div>
|
|
|
+ </transition-group>
|
|
|
+ </draggable>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="showSetting2 = false">取 消</el-button>
|
|
|
+ <el-button @click="delRow2" type="danger">重 置</el-button>
|
|
|
+ <el-button type="primary" @click="save2()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <el-form ref="whgenlegParams" :model="whgenlegParams" label-width="120px">
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="提单号" prop="fMblno">
|
|
@@ -1879,7 +1950,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="入库日期区间" prop="orgStorageDate">
|
|
|
<el-date-picker
|
|
|
style="width: 80%"
|
|
@@ -1901,6 +1972,13 @@
|
|
|
>搜索</el-button
|
|
|
>
|
|
|
</el-col>
|
|
|
+ <el-col :span="2">
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-setting"
|
|
|
+ circle
|
|
|
+ @click="showSetting2 = !showSetting2"
|
|
|
+ ></el-button>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
|
|
@@ -1909,71 +1987,44 @@
|
|
|
ref="table"
|
|
|
tooltip-effect="dark"
|
|
|
width="100%"
|
|
|
- border
|
|
|
stripe
|
|
|
@selection-change="whgenlegSelectionChange"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55"> </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="fMblno"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="提单号"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="fOriginalbilldate"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- width="180px"
|
|
|
- label="入库日期"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="fGoodsids"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="品名"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="fCntrno"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="箱号"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="fGrossweightblc"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="毛重"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="fNetweightblc"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="净重"
|
|
|
- />
|
|
|
+ <el-table-column type="selection" width="50"> </el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="fQtyblc"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="结余数量"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="fWarehouseids"
|
|
|
- header-align="center"
|
|
|
+ v-for="(item, index) in getRowList2"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :width="item.width"
|
|
|
+ :prop="item.label"
|
|
|
align="center"
|
|
|
- label="库位"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="fMarks"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="品牌"
|
|
|
+ :fixed="item.fixed"
|
|
|
+ sortable
|
|
|
>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="item.label == 'fQtyblc2'">
|
|
|
+ <el-input
|
|
|
+ @change="qtyChange(scope.row)"
|
|
|
+ v-model="scope.row.fQtyblc2"
|
|
|
+ placeholder="件数"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.label == 'fGrossweightblc2'">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.fGrossweightblc2"
|
|
|
+ @change="changeOutStock(scope.row)"
|
|
|
+ placeholder="毛重"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.label == 'fNetweightblc2'">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.fNetweightblc2"
|
|
|
+ @change="changeOutStock(scope.row)"
|
|
|
+ placeholder="净重"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ <span v-else>{{ scope.row[item.label] }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
@@ -1984,7 +2035,9 @@
|
|
|
@pagination="getWhgenlegList"
|
|
|
/>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="whgenlegData()">导入库存总账</el-button>
|
|
|
+ <el-button type="primary" @click="whgenlegData()"
|
|
|
+ >导入库存总账</el-button
|
|
|
+ >
|
|
|
<el-button @click="whgenlegVisible = false">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -2963,11 +3016,104 @@ export default {
|
|
|
getRowList: [],
|
|
|
allCheck: false,
|
|
|
showSetting: false,
|
|
|
+ tableDate2: [
|
|
|
+ {
|
|
|
+ surface: "1",
|
|
|
+ label: "fMblno",
|
|
|
+ name: "提单号",
|
|
|
+ checked: 0,
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "2",
|
|
|
+ label: "fOriginalbilldate",
|
|
|
+ name: "入库日期",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ surface: "3",
|
|
|
+ label: "fGoodsids",
|
|
|
+ name: "品名",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "4",
|
|
|
+ label: "fCntrno",
|
|
|
+ name: "箱号",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "5",
|
|
|
+ label: "fQtyblc",
|
|
|
+ name: "结余数量",
|
|
|
+ checked: 0,
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "6",
|
|
|
+ label: "fGrossweightblc",
|
|
|
+ name: "结余毛重(kg)",
|
|
|
+ checked: 0,
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "7",
|
|
|
+ label: "fNetweightblc",
|
|
|
+ name: "结余净重(kg)",
|
|
|
+ checked: 0,
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "8",
|
|
|
+ label: "fWarehouseids",
|
|
|
+ name: "库位",
|
|
|
+ checked: 0,
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "9",
|
|
|
+ label: "fMarks",
|
|
|
+ name: "品牌",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "10",
|
|
|
+ label: "fQtyblc2",
|
|
|
+ name: "数量",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "11",
|
|
|
+ label: "fGrossweightblc2",
|
|
|
+ name: "毛重(kg)",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "12",
|
|
|
+ label: "fNetweightblc2",
|
|
|
+ name: "净重(kg)",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ setRowList2: [],
|
|
|
+ getRowList2: [],
|
|
|
+ allCheck2: false,
|
|
|
+ showSetting2: false,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.setRowList = this.tableDate;
|
|
|
this.getRowList = this.tableDate;
|
|
|
+ this.setRowList2 = this.tableDate2;
|
|
|
+ this.getRowList2 = this.tableDate2;
|
|
|
this.getDicts("data_stltype_type").then((response) => {
|
|
|
this.fStltypeOptions = response.data;
|
|
|
});
|
|
@@ -3030,6 +3176,7 @@ export default {
|
|
|
this.company = localStorage.getItem("companyName");
|
|
|
this.queryUser();
|
|
|
this.getRow();
|
|
|
+ this.getRow2();
|
|
|
},
|
|
|
filters: {
|
|
|
fStorageFormat(row) {
|
|
@@ -3050,6 +3197,15 @@ export default {
|
|
|
}
|
|
|
return name;
|
|
|
},
|
|
|
+ goodsFormat(row,goodsOptions) {
|
|
|
+ let goods;
|
|
|
+ goodsOptions.map((e) => {
|
|
|
+ if (row== e.fId) {
|
|
|
+ goods = e.fName;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return goods;
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
@@ -3140,6 +3296,72 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //列设置全选
|
|
|
+ allChecked2() {
|
|
|
+ if (this.allCheck2 == true) {
|
|
|
+ this.setRowList2.map((e) => {
|
|
|
+ return (e.checked = 0);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.setRowList2.map((e) => {
|
|
|
+ return (e.checked = 1);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //查询列数据
|
|
|
+ getRow2() {
|
|
|
+ let that = this;
|
|
|
+ this.data = {
|
|
|
+ tableName: "出库总账",
|
|
|
+ userId: Cookies.get("userName"),
|
|
|
+ };
|
|
|
+ select(this.data).then((res) => {
|
|
|
+ if (res.data.length != 0) {
|
|
|
+ this.getRowList2 = res.data.filter((e) => e.checked == 0);
|
|
|
+ this.setRowList2 = res.data;
|
|
|
+ this.setRowList2 = this.setRowList2.reduce((res, item) => {
|
|
|
+ res.push({
|
|
|
+ surface: item.surface,
|
|
|
+ label: item.label,
|
|
|
+ name: item.name,
|
|
|
+ checked: item.checked,
|
|
|
+ width: item.width,
|
|
|
+ fixed: item.fixed,
|
|
|
+ });
|
|
|
+ return res;
|
|
|
+ }, []);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //重置列表
|
|
|
+ delRow2() {
|
|
|
+ this.data = {
|
|
|
+ tableName: "出库总账",
|
|
|
+ userId: Cookies.get("userName"),
|
|
|
+ };
|
|
|
+ resetModule(this.data).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.showSetting2 = false;
|
|
|
+ this.setRowList2 = this.$options.data().tableDate2;
|
|
|
+ this.getRowList2 = this.$options.data().tableDate2;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //保存列设置
|
|
|
+ save2() {
|
|
|
+ this.showSetting2 = false;
|
|
|
+ this.data = {
|
|
|
+ tableName: "出库总账",
|
|
|
+ userId: Cookies.get("userName"),
|
|
|
+ sysTableSetList: this.setRowList2,
|
|
|
+ };
|
|
|
+ addSet(this.data).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.showSetting2 = false;
|
|
|
+ this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
//开始拖拽事件
|
|
|
onStart() {
|
|
|
this.drag = true;
|
|
@@ -3169,11 +3391,11 @@ export default {
|
|
|
},
|
|
|
// 出库件数的计算
|
|
|
qtyChange(row) {
|
|
|
- if (!row.fQty || row.fQty === "") {
|
|
|
- this.$set(row, "fNetweight", 0);
|
|
|
- this.$set(row, "fGrossweight", 0);
|
|
|
- return false;
|
|
|
- }
|
|
|
+ // if (!row.fQty || row.fQty === "") {
|
|
|
+ // this.$set(row, "fNetweight", 0);
|
|
|
+ // this.$set(row, "fGrossweight", 0);
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
if (row.fPlanqty < row.fQty) {
|
|
|
this.$message.error("出库件数超出结余件数!");
|
|
|
this.$set(row, "fQty", 0);
|
|
@@ -3181,6 +3403,13 @@ export default {
|
|
|
this.$set(row, "fGrossweight", 0);
|
|
|
return false;
|
|
|
}
|
|
|
+ if (row.fQtyblc2 > row.fQtyblc) {
|
|
|
+ this.$message.error("出库件数超出结余件数!");
|
|
|
+ this.$set(row, "fQtyblc2", 0);
|
|
|
+ this.$set(row, "fGrossweightblc2", 0);
|
|
|
+ this.$set(row, "fNetweightblc2", 0);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
this.$set(
|
|
|
row,
|
|
|
"fNetweight",
|
|
@@ -3196,6 +3425,22 @@ export default {
|
|
|
Number(row.fQty)
|
|
|
).toFixed(2)
|
|
|
);
|
|
|
+ this.$set(
|
|
|
+ row,
|
|
|
+ "fNetweightblc2",
|
|
|
+ parseFloat(
|
|
|
+ (Number(row.fNetweightblc) / Number(row.fQtyblc)) *
|
|
|
+ Number(row.fQtyblc2)
|
|
|
+ ).toFixed(2)
|
|
|
+ );
|
|
|
+ this.$set(
|
|
|
+ row,
|
|
|
+ "fGrossweightblc2",
|
|
|
+ parseFloat(
|
|
|
+ (Number(row.fGrossweightblc) / Number(row.fQtyblc)) *
|
|
|
+ Number(row.fQtyblc2)
|
|
|
+ ).toFixed(2)
|
|
|
+ );
|
|
|
},
|
|
|
whgenlegData() {
|
|
|
if (this.dialogWhgenlegList.length === 0) {
|
|
@@ -3220,9 +3465,9 @@ export default {
|
|
|
fOriginalbilldate: e.fOriginalbilldate,
|
|
|
fOriginalbillno: e.fOriginalbillno,
|
|
|
fPackagespecs: e.fPackagespecs,
|
|
|
- fGrossweight: 0,
|
|
|
- fNetweight: 0,
|
|
|
- fQty: 0,
|
|
|
+ fGrossweight: e.fGrossweightblc,
|
|
|
+ fNetweight: e.fNetweightblc2,
|
|
|
+ fQty: e.fQtyblc2,
|
|
|
fCntqty: 1,
|
|
|
fBillstatus: 10,
|
|
|
fWarehouselocid: e.fWarehouseLocationid,
|
|
@@ -3235,7 +3480,7 @@ export default {
|
|
|
fDriverName: this.whgenlegList.fDriverName,
|
|
|
fDriverTel: this.whgenlegList.fDriverTel,
|
|
|
fDriverIdCar: this.whgenlegList.fDriverIdCar,
|
|
|
- fBusinessType: e.fBusinessType.toString(),
|
|
|
+ fBusinessType: e.fBusinessType + "",
|
|
|
fWarehouseInformation: e.fWarehouseids,
|
|
|
});
|
|
|
});
|
|
@@ -4197,6 +4442,23 @@ export default {
|
|
|
this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
|
|
|
listWhgenleg(this.whgenlegParams).then((response) => {
|
|
|
this.whgenlegList = response.rows;
|
|
|
+ this.whgenlegList = this.whgenlegList.reduce((res, e) => {
|
|
|
+ res.push({
|
|
|
+ fMblno: e.fMblno,
|
|
|
+ fOriginalbilldate: e.fOriginalbilldate,
|
|
|
+ fGoodsids: e.fGoodsids,
|
|
|
+ fCntrno: e.fCntrno,
|
|
|
+ fQtyblc: e.fQtyblc,
|
|
|
+ fGrossweightblc: e.fGrossweightblc,
|
|
|
+ fNetweightblc: e.fNetweightblc,
|
|
|
+ fWarehouseids: e.fWarehouseids,
|
|
|
+ fMarks: e.fMarks,
|
|
|
+ fQtyblc2: e.fQtyblc,
|
|
|
+ fGrossweightblc2: e.fGrossweightblc,
|
|
|
+ fNetweightblc2: e.fNetweightblc,
|
|
|
+ });
|
|
|
+ return res;
|
|
|
+ }, []);
|
|
|
this.whgenlegTotal = response.total;
|
|
|
});
|
|
|
},
|