1.修改单据编辑页面,拆分编辑单据时间弹窗为修改全部和修改单条单据时间

2.删除条码修改为减一
master
x_z 3 years ago
parent a165197aee
commit 7b3b95cccc

@ -340,5 +340,13 @@ export function updateOrderInfo(data) {
}) })
} }
export function getOrderById(params) {
return axios({
url: "/udiwms/inout/order/getOrderById",
method: "get",
params: params
})
}

@ -11,6 +11,10 @@
>查询 >查询
</el-button </el-button
> >
<el-button type="primary" icon="search" @click="editOrderTime"
>编辑
</el-button
>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -41,7 +45,7 @@
type="text" type="text"
@click.native.stop="replaceCodes(scope.row)" @click.native.stop="replaceCodes(scope.row)"
> >
删除 减一
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -132,11 +136,53 @@
> >
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
title="修改时间"
:visible.sync="editOrderVisible"
width="35%"
append-to-body
v-if="editOrderVisible"
>
<el-row style="width: 100%">
<el-lable>创建时间</el-lable>
<el-date-picker
v-model="actDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"
placeholder="选择日期时间">
</el-date-picker>
</el-row>
<el-row style="width: 100%; margin-top: 20px;">
<el-lable>审核时间</el-lable>
<el-date-picker
v-model="auditTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
</el-row>
<div style="text-align: right; margin-top: 10px;">
<el-button type="primary" size="small" icon="search" @click="updateOrderInfo"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelEdit"
>取消
</el-button
>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {codeList} from "../../api/warehouse/order"; import {codeList, updateOrderInfo, getOrderById} from "../../api/warehouse/order";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import {replaceCodes} from "@/api/basic/invWarehouse"; import {replaceCodes} from "@/api/basic/invWarehouse";
@ -172,7 +218,10 @@
newCode: null, newCode: null,
newCount: null, newCount: null,
orderId: null orderId: null
} },
actDate: null,
auditTime: null,
editOrderVisible: false
}; };
}, },
components: { components: {
@ -243,7 +292,7 @@
}; };
}, },
replaceCodes(row) { replaceCodes(row) {
this.$confirm("是否确认删除条码和相关库存单据数据", "提示", { this.$confirm("是否确认库存减一", "提示", {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
@ -255,7 +304,7 @@
}; };
replaceCodes(this.codeDetail).then((res) => { replaceCodes(this.codeDetail).then((res) => {
if (res.code === 20000) { if (res.code === 20000) {
this.$message.success("删除成功"); this.$message.success("操作成功");
this.getCodeList(); this.getCodeList();
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
@ -266,9 +315,48 @@
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消删除' message: '已取消操作'
}); });
}); });
},
editOrderTime() {
let getOrderDataParam = {
id: this.query.corpOrderId,
};
getOrderById(getOrderDataParam).then((res) => {
this.actDate = res.data.actDate;
this.auditTime = res.data.auditTime;
this.editOrderVisible = true;
}).catch((error) => {
});
},
updateOrderInfo() {
if (this.actDate === null || this.auditTime === null) {
this.$message.warning("创建时间和审核时间不能为空");
return;
} else if (this.actDate > this.auditTime) {
this.$message.warning("请检查创建时间和审核时间是否正确");
return;
}
let data = {
actDate: this.actDate,
auditTime: this.auditTime,
orderIds: [this.query.corpOrderId]
};
updateOrderInfo(data).then((res) => {
if (res.code === 20000) {
this.$message.success("修改成功");
}
}).catch((error) => {
});
this.actDate = null;
this.auditTime = null;
this.editOrderVisible = false;
},
cancelEdit() {
this.editOrderVisible = false;
this.actDate = null;
this.auditTime = null;
} }
}, },
filters: {}, filters: {},

@ -16,7 +16,8 @@
<el-button-group> <el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="onSubmit"></el-button> <el-button type="primary" icon="search" @click="onSubmit"></el-button>
<el-button type="primary" icon="search" @click="deleteAllOrder"></el-button> <el-button type="primary" icon="search" @click="deleteAllOrder"></el-button>
<el-button type="primary" icon="search" @click="editAllOrderTime"></el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
@ -32,7 +33,6 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
> >
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="扫码单据类型" prop="action"> <el-table-column label="扫码单据类型" prop="action">
<template slot-scope="scope"> <template slot-scope="scope">
@ -92,18 +92,11 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="150"> <el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleEdit(scope.row)"
>编辑
</el-button
>
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="intentDetail(scope.row)" @click.native.stop="intentDetail(scope.row)"
>详情 >编辑
</el-button </el-button
> >
<el-button <el-button
@ -189,7 +182,7 @@
</el-card> </el-card>
<el-dialog <el-dialog
title="单号详情" title="详情"
:visible.sync="codeDetailVisible" :visible.sync="codeDetailVisible"
width="80%" width="80%"
v-if="codeDetailVisible" v-if="codeDetailVisible"
@ -208,19 +201,20 @@
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="编辑单据" title="修改时间"
:visible.sync="editOrderVisible" :visible.sync="editOrderVisible"
width="25%" width="35%"
v-if="editOrderVisible" v-if="editOrderVisible"
> >
<el-row style="width: 100%"> <el-row style="width: 100%">
<el-lable>创建时间</el-lable> <el-lable>创建时间</el-lable>
<el-date-picker <el-date-picker
v-model="actDate" v-model="actDate"
type="date" type="datetime"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions" :picker-options="pickerOptions"
placeholder="选择日期"> placeholder="选择日期时间">
</el-date-picker> </el-date-picker>
</el-row> </el-row>
@ -228,8 +222,8 @@
<el-lable>审核时间</el-lable> <el-lable>审核时间</el-lable>
<el-date-picker <el-date-picker
v-model="auditTime" v-model="auditTime"
type="date" type="datetime"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions" :picker-options="pickerOptions"
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
@ -313,9 +307,7 @@
codeDetailVisible: false, codeDetailVisible: false,
editOrderVisible: false, editOrderVisible: false,
actDate: null, // actDate: null, //
actDate2: null, //
auditTime: null, // auditTime: null, //
auditTime2: null,//
orderIds: [], orderIds: [],
pickerOptions: { pickerOptions: {
disabledDate: time => { disabledDate: time => {
@ -368,6 +360,7 @@
} }
}, },
getList() { getList() {
this.query.billNo = this.query.billNo.trim();
if (this.query.billNo === null || this.query.billNo === "") { if (this.query.billNo === null || this.query.billNo === "") {
this.$message.warning("请输入需要查询的单号"); this.$message.warning("请输入需要查询的单号");
} else { } else {
@ -503,6 +496,14 @@
}); });
}) })
}, },
editAllOrderTime() {
if (this.query.billNo === null || this.query.billNo === "" || this.list.length === 0) {
return;
}
this.actDate = null;
this.auditTime = null;
this.editOrderVisible = true;
},
intentDetail(row) { intentDetail(row) {
this.codeDetailVisible = true; this.codeDetailVisible = true;
this.idQuery.id = row.id; this.idQuery.id = row.id;
@ -528,8 +529,6 @@
this.list.forEach(item => { this.list.forEach(item => {
this.orderIds.push(item.id); this.orderIds.push(item.id);
}); });
this.actDate = this.actDate + " " + this.actDate2;
this.auditTime = this.auditTime + " " + this.auditTime2;
let data = { let data = {
actDate: this.actDate, actDate: this.actDate,
auditTime: this.auditTime, auditTime: this.auditTime,

Loading…
Cancel
Save