给销售订单转采购订单的流程配置开关

This commit is contained in:
季圣华
2022-05-18 21:08:32 +08:00
parent 951793d396
commit 38bf8477c6
4 changed files with 52 additions and 8 deletions

View File

@@ -147,6 +147,7 @@
import BillDetail from './dialog/BillDetail'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { BillListMixin } from './mixins/BillListMixin'
import { getCurrentSystemConfig } from '@/api/api'
import JDate from '@/components/jeecg/JDate'
import Vue from 'vue'
export default {
@@ -213,7 +214,7 @@
{ title: '状态', dataIndex: 'status', width: 70, align: "center",
scopedSlots: { customRender: 'customRenderStatus' }
},
{ title: '采购状态', dataIndex: 'purchaseStatus', width: 70, align: "center",
{ title: '采购进度', dataIndex: 'purchaseStatus', width: 70, align: "center",
scopedSlots: { customRender: 'customRenderPurchaseStatus' }
},
{
@@ -234,6 +235,7 @@
created() {
this.initCustomer()
this.initUser()
this.getSystemConfig()
},
computed: {
},
@@ -252,7 +254,30 @@
} else {
this.$message.warning("抱歉只有未审核的单据才能删除")
}
}
},
getSystemConfig() {
getCurrentSystemConfig().then((res) => {
if(res.code === 200 && res.data){
let purchaseBySaleFlag = res.data.purchaseBySaleFlag
if(purchaseBySaleFlag === "0") {
if(this.columns.length === 10) {
this.columns.splice(8, 1)
}
} else {
if(this.columns.length<10) {
let purchaseStatusObj = { title: '采购进度', dataIndex: 'purchaseStatus', width: 70, align: "center",
scopedSlots: { customRender: 'customRenderPurchaseStatus' }
}
this.columns.splice(8, 0, purchaseStatusObj)
}
}
}
})
},
searchQuery() {
this.loadData(1)
this.getSystemConfig()
},
}
}
</script>

View File

@@ -198,7 +198,7 @@
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
<a-form-item v-if="purchaseBySaleFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
<a @click="myHandleDetail(model.linkNumber)">{{model.linkNumber}}</a>
</a-form-item>
</a-col>
@@ -923,7 +923,7 @@
<script>
import pick from 'lodash.pick'
import { getAction } from '@/api/manage'
import { findBillDetailByNumber, getPlatformConfigByKey} from '@/api/api'
import { findBillDetailByNumber, getPlatformConfigByKey, getCurrentSystemConfig} from '@/api/api'
import { getMpListShort } from "@/utils/util"
import BillPrintIframe from './BillPrintIframe'
import JUpload from '@/components/jeecg/JUpload'
@@ -943,6 +943,7 @@
billType: '',
billPrintFlag: false,
fileList: [],
purchaseBySaleFlag: false,
tableWidth: {
'width': '1550px'
},
@@ -1325,6 +1326,13 @@
}
})
},
getSystemConfig() {
getCurrentSystemConfig().then((res) => {
if(res.code === 200 && res.data){
this.purchaseBySaleFlag = res.data.purchaseBySaleFlag==='1'?true:false
}
})
},
show(record, type) {
this.billType = type
//附件下载
@@ -1347,6 +1355,7 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(record, type, url, params);
this.initPlatform()
this.getSystemConfig()
},
requestSubTableData(record, type, url, params, success) {
this.loading = true

View File

@@ -9,7 +9,7 @@ export const BillListMixin = {
cusList: [],
retailList: [],
userList: [],
accountList: []
accountList: [],
}
},
computed: {
@@ -138,6 +138,6 @@ export const BillListMixin = {
this.accountList = list
}
})
}
},
}
}

View File

@@ -47,7 +47,7 @@
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单" data-step="3" data-title="关联订单"
<a-form-item v-if="purchaseBySaleFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单" data-step="3" data-title="关联订单"
data-intro="采购订单单据可以通过关联订单来选择已录入的销售订单选择之后会自动加载订单的内容
提交之后原来的销售订单会对应的改变单据状态另外本系统支持分批多次关联">
<a-input-search placeholder="请选择关联订单" v-decorator="[ 'linkNumber' ]" @search="onSearchLinkNumber" :readOnly="true"/>
@@ -129,6 +129,7 @@
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { BillModalMixin } from '../mixins/BillModalMixin'
import { getCurrentSystemConfig } from '@/api/api'
import { getMpListShort,handleIntroJs } from "@/utils/util"
import JUpload from '@/components/jeecg/JUpload'
import JDate from '@/components/jeecg/JDate'
@@ -160,6 +161,7 @@
prefixNo: 'CGDD',
fileList:[],
rowCanEdit: true,
purchaseBySaleFlag: true,
model: {},
labelCol: {
xs: { span: 24 },
@@ -226,6 +228,7 @@
editAfter() {
this.rowCanEdit = true
this.materialTable.columns[1].type = FormTypes.popupJsh
this.getSystemConfig()
this.changeColumnHide()
if (this.action === 'add') {
this.addInit(this.prefixNo)
@@ -237,7 +240,7 @@
this.model.operTime = this.model.operTimeStr
this.fileList = this.model.fileName
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'remark',
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark',
'discount','discountMoney','discountLastMoney'))
});
// 加载子表数据
@@ -321,6 +324,13 @@
this.materialTable.dataSource = selectBillDetailRows
}
},
getSystemConfig() {
getCurrentSystemConfig().then((res) => {
if(res.code === 200 && res.data){
this.purchaseBySaleFlag = res.data.purchaseBySaleFlag==='1'?true:false
}
})
},
}
}
</script>