|
|
|
@ -11,6 +11,10 @@
|
|
|
|
|
>查询
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" icon="search" @click="editOrderTime"
|
|
|
|
|
>编辑
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
@ -41,7 +45,7 @@
|
|
|
|
|
type="text"
|
|
|
|
|
@click.native.stop="replaceCodes(scope.row)"
|
|
|
|
|
>
|
|
|
|
|
删除
|
|
|
|
|
减一
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -132,11 +136,53 @@
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</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>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {codeList} from "../../api/warehouse/order";
|
|
|
|
|
import {codeList, updateOrderInfo, getOrderById} from "../../api/warehouse/order";
|
|
|
|
|
import draggable from "vuedraggable";
|
|
|
|
|
import {replaceCodes} from "@/api/basic/invWarehouse";
|
|
|
|
|
|
|
|
|
@ -172,7 +218,10 @@
|
|
|
|
|
newCode: null,
|
|
|
|
|
newCount: null,
|
|
|
|
|
orderId: null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
actDate: null,
|
|
|
|
|
auditTime: null,
|
|
|
|
|
editOrderVisible: false
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
@ -243,7 +292,7 @@
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
replaceCodes(row) {
|
|
|
|
|
this.$confirm("是否确认删除条码和相关库存单据数据", "提示", {
|
|
|
|
|
this.$confirm("是否确认库存减一", "提示", {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
@ -255,7 +304,7 @@
|
|
|
|
|
};
|
|
|
|
|
replaceCodes(this.codeDetail).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.$message.success("删除成功");
|
|
|
|
|
this.$message.success("操作成功");
|
|
|
|
|
this.getCodeList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
@ -266,9 +315,48 @@
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
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: {},
|
|
|
|
|