|
|
@@ -14,8 +14,8 @@
|
|
|
<el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
|
|
|
:disabled="isSaveBtn" @click="submit">保 存
|
|
|
</el-button>
|
|
|
- <el-button type="success" size="small" v-if="form.buxStaus == '录入'" @click.stop="confirm">调箱确认</el-button>
|
|
|
- <el-button type="danger" size="small" v-if="form.buxStaus == '已确认'" @click.stop="revoke">调箱撤销</el-button>
|
|
|
+ <el-button type="success" size="small" v-if="form.buxStaus == '录入'" @click.stop="confirm">确认出场</el-button>
|
|
|
+ <el-button type="danger" size="small" v-if="form.buxStaus == '已确认'" @click.stop="revoke">撤销出场</el-button>
|
|
|
<!-- <el-button v-if="form.status == '审核提交'" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
|
|
|
size="small" @click="revokeApplication">撤销单据请核
|
|
|
</el-button> -->
|
|
|
@@ -71,6 +71,35 @@
|
|
|
</tempalte>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
+ <trade-card title="箱型箱量">
|
|
|
+ <avue-crud ref="crudBox" :option="boxOption" :data="form.boxTypeList"
|
|
|
+ @selection-change="boxSelectionChange">
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="info" plain size="small" :disabled="editDisabled || !form.id||form.buxStaus == '已确认'"
|
|
|
+ @click="allClick('box一键保存')">一键保存</el-button>
|
|
|
+ <el-button type="info" plain size="small"
|
|
|
+ :disabled="editDisabled || form.boxTypeList.length == 0||form.buxStaus == '已确认'"
|
|
|
+ @click="allClick('box一键编辑')">一键编辑</el-button>
|
|
|
+ <el-button type="danger" plain size="small"
|
|
|
+ :disabled="editDisabled || boxSelectionList.length == 0||form.buxStaus == '已确认'"
|
|
|
+ @click="allClick('box批量删除')">批量删除</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="indexHeader" slot-scope="{row,index}">
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-plus"
|
|
|
+ :disabled="editDisabled || !form.id" circle @click="boxAddRow()">
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="index" slot-scope="{row,index}">
|
|
|
+ <span>{{ index + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="boxTypeForm" slot-scope="{ row }">
|
|
|
+ <dic-select v-if="row.$cellEdit" v-model="row.boxType" key="id" label="cnName" res="records"
|
|
|
+ url="/blade-los/bcntrtypes/list?status=0¤t=1&size=20" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="rowDicChange('boxType', $event, row)"></dic-select>
|
|
|
+ <span v-else>{{ row.boxType }}</span>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </trade-card>
|
|
|
<trade-card title="箱明细">
|
|
|
<avue-crud :option="option" :data="form.tradingBoxItemsList" id="out-table" ref="crud"
|
|
|
:header-cell-class-name="headerClassName" :row-style="{ height: '20px', padding: '0px' }"
|
|
|
@@ -293,6 +322,8 @@ import {
|
|
|
submitItemList,
|
|
|
submitFeeList,
|
|
|
enable,
|
|
|
+ submitBoxList,
|
|
|
+ boxRemove,
|
|
|
copyAgent,
|
|
|
confirm,
|
|
|
revoke
|
|
|
@@ -309,6 +340,100 @@ export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ boxSelectionList: [],
|
|
|
+ boxOption: {
|
|
|
+ calcHeight: 30,
|
|
|
+ menuWidth: 120,
|
|
|
+ menu: false,
|
|
|
+ tip: false,
|
|
|
+ border: true,
|
|
|
+ addBtn: false,
|
|
|
+ viewBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ // header: false,
|
|
|
+ columnBtn: false,
|
|
|
+ refreshBtn: false,
|
|
|
+ selection: true,
|
|
|
+ align: 'center',
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "index",
|
|
|
+ prop: "index",
|
|
|
+ width: "55",
|
|
|
+ headerslot: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "箱型",
|
|
|
+ prop: "boxType",
|
|
|
+ cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
+ overHidden: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择箱型",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "箱数",
|
|
|
+ prop: "number",
|
|
|
+ cell: true,
|
|
|
+ overHidden: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入箱量",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "出场日期",
|
|
|
+ prop: "exitDate",
|
|
|
+ type: "date",
|
|
|
+ cell: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "制单人",
|
|
|
+ prop: "createUserName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "制单日期",
|
|
|
+ prop: "createTime",
|
|
|
+ type: "date",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改人",
|
|
|
+ prop: "updateUserName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改日期",
|
|
|
+ prop: "updateTime",
|
|
|
+ type: "date",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'remarks',
|
|
|
+ cell: true,
|
|
|
+ width: 150,
|
|
|
+ overHidden: true,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
excelBox: false,
|
|
|
excelForm: {},
|
|
|
excelLoading: false,
|
|
|
@@ -347,7 +472,8 @@ export default {
|
|
|
editButton: false,
|
|
|
editDisabled: false,
|
|
|
form: {
|
|
|
- type: "XGDX",
|
|
|
+ type: "CCSQ",
|
|
|
+ boxTypeList: [],
|
|
|
tradingBoxItemsList: [],
|
|
|
feeCenterList: [],
|
|
|
tradingBoxFilesList: [],
|
|
|
@@ -1322,8 +1448,14 @@ export default {
|
|
|
boxCondition:'新',
|
|
|
$cellEdit: true
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
+ },
|
|
|
+ boxAddRow() {
|
|
|
+ this.form.boxTypeList.push(
|
|
|
+ {
|
|
|
+ pid: this.form.id ? this.form.id : null,
|
|
|
+ $cellEdit: true
|
|
|
+ }
|
|
|
+ )
|
|
|
},
|
|
|
feecAddRow() {
|
|
|
if (!this.form.id) {
|
|
|
@@ -1342,6 +1474,9 @@ export default {
|
|
|
selectionChange(list) {
|
|
|
this.selectionList = list;
|
|
|
},
|
|
|
+ boxSelectionChange(list) {
|
|
|
+ this.boxSelectionList = list;
|
|
|
+ },
|
|
|
feecChange(list) {
|
|
|
let ids = []
|
|
|
list.forEach(e => {
|
|
|
@@ -1447,6 +1582,75 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
allClick(name) {
|
|
|
+ if (name == 'box一键保存') {
|
|
|
+ if (!this.form.boxTypeList.length) {
|
|
|
+ return this.$message.error("请添加数据");
|
|
|
+ }
|
|
|
+ for (let row of this.form.boxTypeList) {
|
|
|
+ if (!row.boxType || !row.number || !row.exitDate) {
|
|
|
+ this.$refs.crudBox.rowCell(row, row.$index)
|
|
|
+ return this.$message.error("请完善箱型箱量");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submitBoxList(this.form.boxTypeList).then(res => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.form.boxTypeList = res.data.data
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == 'box一键编辑') {
|
|
|
+ for (let row of this.form.boxTypeList) {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'box批量删除') {
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ if (item.whetherEnable == '是') {
|
|
|
+ return this.$message.error("启用状态不能删除!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let multiList = []
|
|
|
+ let arr = []
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ multiList = this.boxSelectionList
|
|
|
+ arr = this.form.boxTypeList
|
|
|
+ // 获取有id 的数据
|
|
|
+ const itemsWithId = multiList.filter(item => item.id != null);
|
|
|
+ let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
|
|
|
+ // 把选中的删除掉
|
|
|
+ multiList.forEach((item) => {
|
|
|
+ for (let index in arr) {
|
|
|
+ if (JSON.stringify(item) == JSON.stringify(arr[index])) {
|
|
|
+ arr.splice(Number(index), 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (itemsWithId.length != 0) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ boxRemove({ ids: arrIds.join(',') }).then(res => {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
if (name == '一键保存') {
|
|
|
if (!this.form.tradingBoxItemsList.length) {
|
|
|
return this.$message.error("请添加数据");
|
|
|
@@ -1454,7 +1658,7 @@ export default {
|
|
|
for (let row of this.form.tradingBoxItemsList) {
|
|
|
if (!row.code || !row.boxType || !row.boxCategory || !row.boxStatus || !row.boxCondition) {
|
|
|
this.$refs.crud.rowCell(row, row.$index)
|
|
|
- return this.$message.error("请完善明细信息");
|
|
|
+ return this.$message.error("请完善箱明细信息");
|
|
|
}
|
|
|
}
|
|
|
const loading = this.$loading({
|
|
|
@@ -1596,10 +1800,16 @@ export default {
|
|
|
this.$refs["form"].validate((valid, done) => {
|
|
|
done();
|
|
|
if (valid) {
|
|
|
+ for (let row of this.form.boxTypeList) {
|
|
|
+ if (!row.boxType || !row.number || !row.exitDate) {
|
|
|
+ this.$refs.crudBox.rowCell(row, row.$index)
|
|
|
+ return this.$message.error("请完善箱型箱量");
|
|
|
+ }
|
|
|
+ }
|
|
|
for (let row of this.form.tradingBoxItemsList) {
|
|
|
if (!row.code || !row.boxType || !row.boxCategory || !row.boxStatus || !row.boxCondition) {
|
|
|
this.$refs.crud.rowCell(row, row.$index)
|
|
|
- return this.$message.error("请完善明细信息");
|
|
|
+ return this.$message.error("请完善箱明细信息");
|
|
|
}
|
|
|
}
|
|
|
for (let row of this.form.feeCenterList) {
|
|
|
@@ -1627,7 +1837,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
confirm() {
|
|
|
- this.$confirm("确定调箱?", {
|
|
|
+ this.$confirm("确定出场?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
@@ -1647,7 +1857,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
revoke() {
|
|
|
- this.$confirm("确定撤销调箱?", {
|
|
|
+ this.$confirm("确定撤销出场?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|