|
@@ -79,6 +79,12 @@
|
|
|
<el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 1&&form.id"
|
|
|
@click.stop="excelBox = true">导入
|
|
|
</el-button>
|
|
|
+<!-- <el-button-->
|
|
|
+<!-- type="success"-->
|
|
|
+<!-- icon="el-icon-printer"-->
|
|
|
+<!-- size="small"-->
|
|
|
+<!-- @click.stop="dialogVisible = true">打印-->
|
|
|
+<!-- </el-button>-->
|
|
|
</template>
|
|
|
<template slot="headerSerial">
|
|
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
|
|
@@ -167,6 +173,20 @@
|
|
|
温馨提示 第一次导入时请先下载模板
|
|
|
</p>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="打印"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ fullscreen
|
|
|
+ append-to-body
|
|
|
+ width="70%">
|
|
|
+ <div id="printAll">
|
|
|
+ <div v-for="item in 1000">测试</div>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary">打 印</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -191,13 +211,13 @@ import {contrastObj, contrastList, contrastList2} from "@/util/contrastData";
|
|
|
import {validatenull} from '@/util/validate'
|
|
|
import check from "@/components/check/check";
|
|
|
import {dateFormat} from "@/util/date";
|
|
|
-
|
|
|
export default {
|
|
|
name: "detailsPageEdit",
|
|
|
data() {
|
|
|
return {
|
|
|
checkData: {},
|
|
|
checkDialog: false,
|
|
|
+ dialogVisible: false,
|
|
|
subLoading: false,
|
|
|
form: {},
|
|
|
excelBox: false,
|
|
@@ -251,7 +271,7 @@ export default {
|
|
|
prop: "stockTime",
|
|
|
type: "datetime",
|
|
|
value: dateFormat(new Date(),'yyyy-MM-dd hh:mm:ss'),
|
|
|
- format: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ format: "yyyy-MM-dd HH:mm",
|
|
|
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
rules: [
|
|
|
{
|
|
@@ -307,7 +327,7 @@ export default {
|
|
|
label: "车船号",
|
|
|
prop: "vehicleShipNumber",
|
|
|
rules: [{
|
|
|
- required: true,
|
|
|
+ required: false,
|
|
|
message: "",
|
|
|
trigger: "blur"
|
|
|
}],
|
|
@@ -583,26 +603,86 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
- if (this.itemsVOList.length == 0) {
|
|
|
- return this.$message({
|
|
|
- type: "warning",
|
|
|
- message: "无明细不允许提交!"
|
|
|
- });
|
|
|
- }
|
|
|
- this.subLoading = true;
|
|
|
- withdraw({
|
|
|
- id: this.form.id,
|
|
|
- type: "RK",
|
|
|
- status: 1,
|
|
|
- isIssue: 1
|
|
|
- }).then(res => {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "提交成功!"
|
|
|
- });
|
|
|
- this.getDetail(this.form.id);
|
|
|
- this.subLoading = false;
|
|
|
- })
|
|
|
+ for (let i = 0; i < this.itemsVOList.length; i++) {
|
|
|
+ // if (validatenull(this.itemsVOList[i].storageId)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的库区')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].itemId)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的品名')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].itemType)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的品牌')
|
|
|
+ // }
|
|
|
+ // if (validatenull(this.itemsVOList[i].grade)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的等级')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].billNo)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].sliceNumber)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的片数')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].storageInQuantity)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的入库量')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].unit)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
|
|
|
+ // }
|
|
|
+ if (this.form.arrival == 1) {
|
|
|
+ if (validatenull(this.itemsVOList[i].price)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.itemsVOList.forEach((e, index) => {
|
|
|
+ e.sort = Number(index) + 1
|
|
|
+ })
|
|
|
+ let orderFeesList = this.$refs.feeInfo.submitData();
|
|
|
+ this.subLoading = true;
|
|
|
+ let data = {
|
|
|
+ ...this.form,
|
|
|
+ billType: 'RK',
|
|
|
+ itemsVOList: this.itemsVOList,
|
|
|
+ orderFeesList: orderFeesList,
|
|
|
+ orderFilesList: this.orderFilesList
|
|
|
+ };
|
|
|
+ submit(data).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.itemsVOList = res.data.data.itemsVOList;
|
|
|
+ this.orderFeesList = res.data.data.orderFeesList;
|
|
|
+ this.orderFilesList = res.data.data.orderFilesList;
|
|
|
+ this.oldform = this.deepClone(res.data.data);
|
|
|
+ this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
|
|
|
+ this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
|
|
|
+ this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "保存成功!"
|
|
|
+ });
|
|
|
+ if (!this.detailData.id){
|
|
|
+ this.detailData.id = res.data.data.id
|
|
|
+ }
|
|
|
+ if (this.itemsVOList.length == 0) {
|
|
|
+ this.subLoading = false
|
|
|
+ return this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "无明细不允许提交!"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ withdraw({
|
|
|
+ id: this.form.id,
|
|
|
+ type: "RK",
|
|
|
+ status: 1,
|
|
|
+ isIssue: 1
|
|
|
+ }).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "提交成功!"
|
|
|
+ });
|
|
|
+ this.getDetail(this.form.id);
|
|
|
+ this.subLoading = false;
|
|
|
+ })
|
|
|
+ })
|
|
|
})
|
|
|
} else {
|
|
|
this.$confirm("是否确认撤销?", {
|
|
@@ -610,19 +690,79 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
+ for (let i = 0; i < this.itemsVOList.length; i++) {
|
|
|
+ // if (validatenull(this.itemsVOList[i].storageId)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的库区')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].itemId)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的品名')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].itemType)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的品牌')
|
|
|
+ // }
|
|
|
+ // if (validatenull(this.itemsVOList[i].grade)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的等级')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].billNo)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].sliceNumber)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的片数')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].storageInQuantity)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的入库量')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].unit)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
|
|
|
+ // }
|
|
|
+ if (this.form.arrival == 1) {
|
|
|
+ if (validatenull(this.itemsVOList[i].price)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.itemsVOList.forEach((e, index) => {
|
|
|
+ e.sort = Number(index) + 1
|
|
|
+ })
|
|
|
+ let orderFeesList = this.$refs.feeInfo.submitData();
|
|
|
this.subLoading = true;
|
|
|
- withdraw({
|
|
|
- id: this.form.id,
|
|
|
- type: "RK",
|
|
|
- status: 0,
|
|
|
- isIssue: 0
|
|
|
- }).then(res => {
|
|
|
+ let data = {
|
|
|
+ ...this.form,
|
|
|
+ billType: 'RK',
|
|
|
+ itemsVOList: this.itemsVOList,
|
|
|
+ orderFeesList: orderFeesList,
|
|
|
+ orderFilesList: this.orderFilesList
|
|
|
+ };
|
|
|
+ submit(data).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.itemsVOList = res.data.data.itemsVOList;
|
|
|
+ this.orderFeesList = res.data.data.orderFeesList;
|
|
|
+ this.orderFilesList = res.data.data.orderFilesList;
|
|
|
+ this.oldform = this.deepClone(res.data.data);
|
|
|
+ this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
|
|
|
+ this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
|
|
|
+ this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "撤销成功!"
|
|
|
+ message: "保存成功!"
|
|
|
});
|
|
|
- this.getDetail(this.form.id);
|
|
|
- this.subLoading = false;
|
|
|
+ if (!this.detailData.id){
|
|
|
+ this.detailData.id = res.data.data.id
|
|
|
+ }
|
|
|
+
|
|
|
+ withdraw({
|
|
|
+ id: this.form.id,
|
|
|
+ type: "RK",
|
|
|
+ status: 0,
|
|
|
+ isIssue: 0
|
|
|
+ }).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "撤销成功!"
|
|
|
+ });
|
|
|
+ this.getDetail(this.form.id);
|
|
|
+ this.subLoading = false;
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
}
|
|
@@ -714,7 +854,150 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
- const data = {
|
|
|
+ for (let i = 0; i < this.itemsVOList.length; i++) {
|
|
|
+ // if (validatenull(this.itemsVOList[i].storageId)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的库区')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].itemId)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的品名')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].itemType)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的品牌')
|
|
|
+ // }
|
|
|
+ // if (validatenull(this.itemsVOList[i].grade)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的等级')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].billNo)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].sliceNumber)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的片数')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].storageInQuantity)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的入库量')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].unit)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
|
|
|
+ // }
|
|
|
+ if (this.form.arrival == 1) {
|
|
|
+ if (validatenull(this.itemsVOList[i].price)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.itemsVOList.forEach((e, index) => {
|
|
|
+ e.sort = Number(index) + 1
|
|
|
+ })
|
|
|
+ let orderFeesList = this.$refs.feeInfo.submitData();
|
|
|
+ this.subLoading = true;
|
|
|
+ let data = {
|
|
|
+ ...this.form,
|
|
|
+ billType: 'RK',
|
|
|
+ itemsVOList: this.itemsVOList,
|
|
|
+ orderFeesList: orderFeesList,
|
|
|
+ orderFilesList: this.orderFilesList
|
|
|
+ };
|
|
|
+ submit(data).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.itemsVOList = res.data.data.itemsVOList;
|
|
|
+ this.orderFeesList = res.data.data.orderFeesList;
|
|
|
+ this.orderFilesList = res.data.data.orderFilesList;
|
|
|
+ this.oldform = this.deepClone(res.data.data);
|
|
|
+ this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
|
|
|
+ this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
|
|
|
+ this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "保存成功!"
|
|
|
+ });
|
|
|
+ if (!this.detailData.id){
|
|
|
+ this.detailData.id = res.data.data.id
|
|
|
+ }
|
|
|
+ const datat = {
|
|
|
+ id: this.form.id,
|
|
|
+ checkType: 'RK',
|
|
|
+ url: '/purchasingManagement/inStock/index',
|
|
|
+ pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
+ pageLabel: "入库管理",
|
|
|
+ checkFlag: 1,
|
|
|
+ }
|
|
|
+ checkWarehousing(datat).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.subLoading = false
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$confirm("确定审核此订单?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ for (let i = 0; i < this.itemsVOList.length; i++) {
|
|
|
+ // if (validatenull(this.itemsVOList[i].storageId)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的库区')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].itemId)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的品名')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].itemType)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的品牌')
|
|
|
+ // }
|
|
|
+ // if (validatenull(this.itemsVOList[i].grade)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的等级')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].billNo)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].sliceNumber)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的片数')
|
|
|
+ // }
|
|
|
+ if (validatenull(this.itemsVOList[i].storageInQuantity)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的入库量')
|
|
|
+ }
|
|
|
+ // if (validatenull(this.itemsVOList[i].unit)) {
|
|
|
+ // return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
|
|
|
+ // }
|
|
|
+ if (this.form.arrival == 1) {
|
|
|
+ if (validatenull(this.itemsVOList[i].price)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.itemsVOList.forEach((e, index) => {
|
|
|
+ e.sort = Number(index) + 1
|
|
|
+ })
|
|
|
+ let orderFeesList = this.$refs.feeInfo.submitData();
|
|
|
+ this.subLoading = true;
|
|
|
+ let data = {
|
|
|
+ ...this.form,
|
|
|
+ billType: 'RK',
|
|
|
+ itemsVOList: this.itemsVOList,
|
|
|
+ orderFeesList: orderFeesList,
|
|
|
+ orderFilesList: this.orderFilesList
|
|
|
+ };
|
|
|
+ submit(data).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.itemsVOList = res.data.data.itemsVOList;
|
|
|
+ this.orderFeesList = res.data.data.orderFeesList;
|
|
|
+ this.orderFilesList = res.data.data.orderFilesList;
|
|
|
+ this.oldform = this.deepClone(res.data.data);
|
|
|
+ this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
|
|
|
+ this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
|
|
|
+ this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "保存成功!"
|
|
|
+ });
|
|
|
+ if (!this.detailData.id){
|
|
|
+ this.detailData.id = res.data.data.id
|
|
|
+ }
|
|
|
+ const dataT = {
|
|
|
id: this.form.id,
|
|
|
checkType: 'RK',
|
|
|
url: '/purchasingManagement/inStock/index',
|
|
@@ -722,8 +1005,7 @@ export default {
|
|
|
pageLabel: "入库管理",
|
|
|
checkFlag: 1,
|
|
|
}
|
|
|
- this.subLoading = true
|
|
|
- checkWarehousing(data).then(res => {
|
|
|
+ checkWarehousing(dataT).then(res => {
|
|
|
if (res.data.success) {
|
|
|
this.$message.success("操作成功!")
|
|
|
}
|
|
@@ -733,32 +1015,6 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
- } else {
|
|
|
- this.$confirm("确定审核此订单?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.subLoading = true
|
|
|
- const data = {
|
|
|
- id: this.form.id,
|
|
|
- checkType: 'RK',
|
|
|
- url: '/purchasingManagement/inStock/index',
|
|
|
- pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
- pageLabel: "入库管理",
|
|
|
- checkFlag: 1,
|
|
|
- }
|
|
|
- checkWarehousing(data).then(res => {
|
|
|
- if (res.data.success) {
|
|
|
- this.$message.success("操作成功!")
|
|
|
- }
|
|
|
- }).finally(() => {
|
|
|
- this.subLoading = false
|
|
|
- this.getDetail(this.form.id)
|
|
|
- })
|
|
|
- }).finally(() => {
|
|
|
-
|
|
|
- })
|
|
|
}
|
|
|
},
|
|
|
revokeCheck() {
|
|
@@ -795,7 +1051,6 @@ export default {
|
|
|
params.valid = true
|
|
|
params.parentId = this.form.id
|
|
|
callback(params)
|
|
|
- console.log('1111')
|
|
|
},
|
|
|
getTemplate() {
|
|
|
window.open(`/api/trade-purchase/woodHarvestingCloud/export-template?${this.website.tokenHeader}=${getToken()}`)
|
|
@@ -806,7 +1061,7 @@ export default {
|
|
|
this.itemsVOList.push({
|
|
|
...item,
|
|
|
containerNo:this.form.caseNo,
|
|
|
- $cellEdit: true
|
|
|
+ $cellEdit: false
|
|
|
})
|
|
|
})
|
|
|
this.excelBox = false
|