|
@@ -101,7 +101,8 @@
|
|
}
|
|
}
|
|
config : any = {
|
|
config : any = {
|
|
attr: {
|
|
attr: {
|
|
- activeName: 'all'
|
|
|
|
|
|
+ activeName: 'all',
|
|
|
|
+ calculateH: true
|
|
},
|
|
},
|
|
// 引单
|
|
// 引单
|
|
source: [
|
|
source: [
|
|
@@ -169,7 +170,6 @@
|
|
},
|
|
},
|
|
table: {
|
|
table: {
|
|
attr: {
|
|
attr: {
|
|
- calculateH: '100%',
|
|
|
|
size: 'mini',
|
|
size: 'mini',
|
|
seq: true,
|
|
seq: true,
|
|
align: 'left',
|
|
align: 'left',
|
|
@@ -239,6 +239,11 @@
|
|
form: {
|
|
form: {
|
|
attr: {
|
|
attr: {
|
|
size: 'medium',
|
|
size: 'medium',
|
|
|
|
+ rules: {
|
|
|
|
+ planDeliveryData: [{
|
|
|
|
+ required: true, message: '请选择交货时间', trigger: 'change'
|
|
|
|
+ }],
|
|
|
|
+ }
|
|
},
|
|
},
|
|
columns: [
|
|
columns: [
|
|
[
|
|
[
|
|
@@ -288,7 +293,7 @@
|
|
},
|
|
},
|
|
{
|
|
{
|
|
span: 8,
|
|
span: 8,
|
|
- label: '计划交货时间',
|
|
|
|
|
|
+ label: '交货时间',
|
|
prop: 'planDeliveryData',
|
|
prop: 'planDeliveryData',
|
|
component: 'by-date-picker',
|
|
component: 'by-date-picker',
|
|
compConfig: {
|
|
compConfig: {
|
|
@@ -301,7 +306,7 @@
|
|
},
|
|
},
|
|
{
|
|
{
|
|
span: 8,
|
|
span: 8,
|
|
- label: '确定交货时间',
|
|
|
|
|
|
+ label: '确定时间',
|
|
prop: 'affirmDeliveryData',
|
|
prop: 'affirmDeliveryData',
|
|
component: 'by-input',
|
|
component: 'by-input',
|
|
compConfig: {
|
|
compConfig: {
|
|
@@ -346,48 +351,57 @@
|
|
table: {
|
|
table: {
|
|
attr: {
|
|
attr: {
|
|
size: 'mini',
|
|
size: 'mini',
|
|
- calculateH: '100%',
|
|
|
|
- align: 'center',
|
|
|
|
|
|
+ align: 'left',
|
|
readonly: true
|
|
readonly: true
|
|
},
|
|
},
|
|
columns:
|
|
columns:
|
|
[{
|
|
[{
|
|
- width: 300,
|
|
|
|
|
|
+ width: 250,
|
|
title: '物料名称',
|
|
title: '物料名称',
|
|
field: 'materialName',
|
|
field: 'materialName',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 180,
|
|
|
|
+ title: '财务编号',
|
|
|
|
+ field: 'financeSuborderId',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ width: 120,
|
|
title: '单位',
|
|
title: '单位',
|
|
field: 'unit',
|
|
field: 'unit',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 120,
|
|
|
|
+ title: '单位编码',
|
|
|
|
+ field: 'unitCode',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ width: 120,
|
|
title: '数量',
|
|
title: '数量',
|
|
field: 'number',
|
|
field: 'number',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 120,
|
|
title: '已交付数量',
|
|
title: '已交付数量',
|
|
field: 'outNumber',
|
|
field: 'outNumber',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 120,
|
|
title: '单价',
|
|
title: '单价',
|
|
field: 'unitPrice',
|
|
field: 'unitPrice',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 120,
|
|
title: '实际金额',
|
|
title: '实际金额',
|
|
field: 'realityPrice',
|
|
field: 'realityPrice',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 120,
|
|
title: '优惠金额',
|
|
title: '优惠金额',
|
|
field: 'prePrice',
|
|
field: 'prePrice',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 120,
|
|
title: '合计金额',
|
|
title: '合计金额',
|
|
field: 'totalPrice',
|
|
field: 'totalPrice',
|
|
},
|
|
},
|
|
@@ -443,14 +457,20 @@
|
|
(this as any).doBackOrder()
|
|
(this as any).doBackOrder()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '同步到财务系统', icon: 'el-icon-top', audit: [''], event: {
|
|
|
|
+ click: () => {
|
|
|
|
+ (this as any).syncSystem()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
]
|
|
]
|
|
},
|
|
},
|
|
table: {
|
|
table: {
|
|
attr: {
|
|
attr: {
|
|
- calculateH: '100%',
|
|
|
|
size: 'mini',
|
|
size: 'mini',
|
|
- seq: true,
|
|
|
|
|
|
+ triggerRowCheck: 'row',
|
|
align: 'left',
|
|
align: 'left',
|
|
radio: true
|
|
radio: true
|
|
},
|
|
},
|
|
@@ -470,6 +490,11 @@
|
|
title: '机构名称',
|
|
title: '机构名称',
|
|
field: 'organizationName',
|
|
field: 'organizationName',
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ width: 150,
|
|
|
|
+ title: '财务编号',
|
|
|
|
+ field: 'financeOrderId',
|
|
|
|
+ },
|
|
{
|
|
{
|
|
width: 90,
|
|
width: 90,
|
|
title: '收货人',
|
|
title: '收货人',
|
|
@@ -481,12 +506,12 @@
|
|
field: 'phone',
|
|
field: 'phone',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 130,
|
|
title: '计划交货时间',
|
|
title: '计划交货时间',
|
|
field: 'planDeliveryData',
|
|
field: 'planDeliveryData',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 130,
|
|
title: '确定交货时间',
|
|
title: '确定交货时间',
|
|
field: 'affirmDeliveryData',
|
|
field: 'affirmDeliveryData',
|
|
},
|
|
},
|
|
@@ -496,21 +521,33 @@
|
|
field: 'address',
|
|
field: 'address',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 90,
|
|
title: '状态',
|
|
title: '状态',
|
|
field: 'status',
|
|
field: 'status',
|
|
component: Assembly,
|
|
component: Assembly,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 110,
|
|
|
|
|
|
+ width: 90,
|
|
title: '操作',
|
|
title: '操作',
|
|
action: true,
|
|
action: true,
|
|
plugins: [
|
|
plugins: [
|
|
{
|
|
{
|
|
- icon: 'el-icon-edit',
|
|
|
|
name: '查看',
|
|
name: '查看',
|
|
- audit: '',
|
|
|
|
event: {
|
|
event: {
|
|
|
|
+ show: (item : any) => {
|
|
|
|
+ return item.status != 0
|
|
|
|
+ },
|
|
|
|
+ click: (item : any) => {
|
|
|
|
+ (this as any).openEdit(item)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '编辑',
|
|
|
|
+ event: {
|
|
|
|
+ show: (item : any) => {
|
|
|
|
+ return item.status === 0
|
|
|
|
+ },
|
|
click: (item : any) => {
|
|
click: (item : any) => {
|
|
(this as any).openEdit(item)
|
|
(this as any).openEdit(item)
|
|
}
|
|
}
|
|
@@ -520,7 +557,7 @@
|
|
name: '拆单',
|
|
name: '拆单',
|
|
event: {
|
|
event: {
|
|
show: (item : any) => {
|
|
show: (item : any) => {
|
|
- return item.isMaster === 1
|
|
|
|
|
|
+ return item.isMaster === 1 && item.status === 0
|
|
},
|
|
},
|
|
click: (item : any) => (this as any).orderTaking(item)
|
|
click: (item : any) => (this as any).orderTaking(item)
|
|
}
|
|
}
|
|
@@ -573,11 +610,8 @@
|
|
},
|
|
},
|
|
table: {
|
|
table: {
|
|
attr: {
|
|
attr: {
|
|
- calculateH: '100%',
|
|
|
|
size: 'mini',
|
|
size: 'mini',
|
|
- seq: true,
|
|
|
|
align: 'left',
|
|
align: 'left',
|
|
- checkbox: true
|
|
|
|
},
|
|
},
|
|
columns: [
|
|
columns: [
|
|
{
|
|
{
|
|
@@ -592,6 +626,11 @@
|
|
title: '机构名称',
|
|
title: '机构名称',
|
|
field: 'organizationName',
|
|
field: 'organizationName',
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ width: 150,
|
|
|
|
+ title: '财务编号',
|
|
|
|
+ field: 'financeOrderId',
|
|
|
|
+ },
|
|
{
|
|
{
|
|
width: 90,
|
|
width: 90,
|
|
title: '收货人',
|
|
title: '收货人',
|
|
@@ -603,12 +642,12 @@
|
|
field: 'phone',
|
|
field: 'phone',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 130,
|
|
title: '计划交货时间',
|
|
title: '计划交货时间',
|
|
field: 'planDeliveryData',
|
|
field: 'planDeliveryData',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 130,
|
|
title: '确定交货时间',
|
|
title: '确定交货时间',
|
|
field: 'affirmDeliveryData',
|
|
field: 'affirmDeliveryData',
|
|
},
|
|
},
|
|
@@ -618,13 +657,13 @@
|
|
field: 'address',
|
|
field: 'address',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 150,
|
|
|
|
|
|
+ width: 100,
|
|
title: '状态',
|
|
title: '状态',
|
|
field: 'status',
|
|
field: 'status',
|
|
component: Assembly,
|
|
component: Assembly,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- width: 110,
|
|
|
|
|
|
+ width: 90,
|
|
title: '操作',
|
|
title: '操作',
|
|
action: true,
|
|
action: true,
|
|
plugins: [{
|
|
plugins: [{
|
|
@@ -827,7 +866,7 @@
|
|
}).catch(() => loading.close());
|
|
}).catch(() => loading.close());
|
|
}
|
|
}
|
|
// 保存
|
|
// 保存
|
|
- onSave(){
|
|
|
|
|
|
+ onSave() {
|
|
let query = (this.$refs.bill as any).getBillFormValue(); // 获取单据数据
|
|
let query = (this.$refs.bill as any).getBillFormValue(); // 获取单据数据
|
|
console.log('保存参数query ==> ', query);
|
|
console.log('保存参数query ==> ', query);
|
|
let loading = this.$loading({ target: '.main-container' });
|
|
let loading = this.$loading({ target: '.main-container' });
|
|
@@ -877,12 +916,19 @@
|
|
(this as any).doBackOrder2(parentData)
|
|
(this as any).doBackOrder2(parentData)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '同步到财务系统', icon: 'el-icon-top', audit: [''], event: {
|
|
|
|
+ click: () => {
|
|
|
|
+ (this as any).syncSystem2(parentData)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
];
|
|
];
|
|
}
|
|
}
|
|
};
|
|
};
|
|
billConfig.tool.tools = {};
|
|
billConfig.tool.tools = {};
|
|
- billConfig.form.columns[0].map((v:any) => {
|
|
|
|
|
|
+ billConfig.form.columns[0].map((v : any) => {
|
|
v.compConfig.attr.readonly = true;
|
|
v.compConfig.attr.readonly = true;
|
|
})
|
|
})
|
|
console.log(billConfig.form.columns[0]);
|
|
console.log(billConfig.form.columns[0]);
|
|
@@ -906,7 +952,7 @@
|
|
}
|
|
}
|
|
// 导航切换
|
|
// 导航切换
|
|
clickTab(e : any) {
|
|
clickTab(e : any) {
|
|
- console.log('导航切换 ==> ', e);
|
|
|
|
|
|
+ // console.log('导航切换 ==> ', e);
|
|
// submitState: 提交状态
|
|
// submitState: 提交状态
|
|
if (e === 'source') {
|
|
if (e === 'source') {
|
|
this.getCitationList({});
|
|
this.getCitationList({});
|
|
@@ -920,16 +966,59 @@
|
|
(this.$refs.bill as any).setBillConfig(billConfig);
|
|
(this.$refs.bill as any).setBillConfig(billConfig);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // 同步销售订单到财务系统
|
|
|
|
+ syncSystem() {
|
|
|
|
+ let selectData = (this as any).$refs.bill.getTableSelectData('all');
|
|
|
|
+ if (selectData.length > 0) {
|
|
|
|
+ if (selectData[0].isMaster !== 1 || selectData[0].status !== 0) return this.$message.warning('只能同步未出库的主单');
|
|
|
|
+ this.$confirm('确定同步订单吗', '注意', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ center: true
|
|
|
|
+ }).then(() => {
|
|
|
|
+ let loading = this.$loading({ target: '.main-container' });
|
|
|
|
+ api.addSaleOrder({ ids: selectData[0].id }).then((res : any) => {
|
|
|
|
+ loading.close();
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message.success('同步订单成功');
|
|
|
|
+ this.getDataList();
|
|
|
|
+ (this.$refs.bill as any).showTab = 'all';
|
|
|
|
+ } else this.$message.error(res.msg)
|
|
|
|
+ }).catch(() => loading.close());
|
|
|
|
+ }).catch(() => this.$message.info('已取消同步订单'));
|
|
|
|
+ } else this.$message.warning('请选择同步数据');
|
|
|
|
+ }
|
|
|
|
+ // 单据操作同步
|
|
|
|
+ syncSystem2(e : any) {
|
|
|
|
+ this.$confirm('确定同步订单吗', '注意', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ center: true
|
|
|
|
+ }).then(() => {
|
|
|
|
+ let loading = this.$loading({ target: '.main-container' });
|
|
|
|
+ api.addSaleOrder({ ids: e.id }).then((res : any) => {
|
|
|
|
+ loading.close();
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message.success('同步订单成功');
|
|
|
|
+ this.getDataList();
|
|
|
|
+ (this.$refs.bill as any).showTab = 'all';
|
|
|
|
+ } else this.$message.error(res.msg)
|
|
|
|
+ }).catch(() => loading.close());
|
|
|
|
+ }).catch(() => this.$message.info('已取消同步订单'));
|
|
|
|
+ }
|
|
// 工具栏终止订单
|
|
// 工具栏终止订单
|
|
doBackOrder() {
|
|
doBackOrder() {
|
|
let selectData = (this as any).$refs.bill.getTableSelectData('all');
|
|
let selectData = (this as any).$refs.bill.getTableSelectData('all');
|
|
|
|
+ console.log(selectData);
|
|
// if (selectData.length > 1) return this.$message.warning('只能选择一条终止订单数据');
|
|
// if (selectData.length > 1) return this.$message.warning('只能选择一条终止订单数据');
|
|
let ids : any = [];
|
|
let ids : any = [];
|
|
if (selectData.length > 0) {
|
|
if (selectData.length > 0) {
|
|
selectData.map((v : any) => {
|
|
selectData.map((v : any) => {
|
|
ids.push(v.id);
|
|
ids.push(v.id);
|
|
})
|
|
})
|
|
- } else return this.$message({ type: 'warning', message: '请选择终止订单数据' })
|
|
|
|
|
|
+ } else return this.$message.warning('请选择终止订单数据');
|
|
// console.log(ids);
|
|
// console.log(ids);
|
|
this.$confirm('确定终止订单吗!', '注意', {
|
|
this.$confirm('确定终止订单吗!', '注意', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
@@ -970,12 +1059,12 @@
|
|
// 分页
|
|
// 分页
|
|
pagination(e : any) {
|
|
pagination(e : any) {
|
|
console.log('分页 ==> ', e);
|
|
console.log('分页 ==> ', e);
|
|
- if(e.type==='source_0'){
|
|
|
|
|
|
+ if (e.type === 'source_0') {
|
|
let query : any = (this as any).$refs.bill.$refs.source_0[0].getSearchValue();
|
|
let query : any = (this as any).$refs.bill.$refs.source_0[0].getSearchValue();
|
|
query.pageNo = e.page.pageNum;
|
|
query.pageNo = e.page.pageNum;
|
|
query.pageSize = e.page.pageSize;
|
|
query.pageSize = e.page.pageSize;
|
|
this.getCitationList(query);
|
|
this.getCitationList(query);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
let query : any = (this as any).$refs.bill.getSearchValue(e.type);
|
|
let query : any = (this as any).$refs.bill.getSearchValue(e.type);
|
|
query.pageNo = e.page.pageNum;
|
|
query.pageNo = e.page.pageNum;
|
|
query.pageSize = e.page.pageSize;
|
|
query.pageSize = e.page.pageSize;
|