零件导入,零件分配,车间采购系统
This commit is contained in:
@@ -26,13 +26,14 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="预付款">
|
||||
<el-select v-model="payMethodValue" placeholder="预付款" size="small" @change="payMethodChange">
|
||||
<el-option
|
||||
v-for="item in payMethod"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="AdvanceCharge" size="small" placeholder="预付款"/>
|
||||
<!--<el-select v-model="payMethodValue" placeholder="预付款" size="small" @change="payMethodChange">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in payMethod"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -355,7 +356,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, initPayMethod, initPayTimeNode, update, doneContract, initPurchaseOrder, searchData, searchData1, searchData2, searchContractDemo } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
|
||||
import { searchSupplier, update, doneContract, initPurchaseOrder, searchData, searchData1, searchData2, searchContractDemo } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
inject: ['reload'],
|
||||
@@ -370,6 +371,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
AdvanceCharge: '',
|
||||
loading: false,
|
||||
dialogVisible1: false,
|
||||
disable2: true,
|
||||
@@ -545,14 +547,14 @@ export default {
|
||||
}
|
||||
},
|
||||
searchDemo(row = this.paramRow) {
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
if (this.payMethod[i].value === this.payMethodValue) {
|
||||
this.payMethodName = this.payMethod[i].label
|
||||
}
|
||||
}
|
||||
// for (let i = 0; i < this.payMethod.length; i++) {
|
||||
// if (this.payMethod[i].value === this.payMethodValue) {
|
||||
// this.payMethodName = this.payMethod[i].label
|
||||
// }
|
||||
// }
|
||||
this.paramRow = row
|
||||
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
|
||||
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
|
||||
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('AdvanceCharge', this.AdvanceCharge)
|
||||
})
|
||||
},
|
||||
contractChange() {
|
||||
@@ -562,49 +564,49 @@ export default {
|
||||
searchContractDemo().then(response => { // 初始化合同模板
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
this.payMethod = []
|
||||
initPayMethod().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.payMethod.push({
|
||||
label: response.data[i].付款方式内容,
|
||||
value: response.data[i].付款方式流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.payTime1 = []
|
||||
this.payTime2 = []
|
||||
this.payTime3 = []
|
||||
this.payTime4 = []
|
||||
this.payTime5 = []
|
||||
this.payTime6 = []
|
||||
initPayTimeNode().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.payTime1.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
this.payTime2.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
this.payTime3.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
this.payTime4.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
this.payTime5.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
this.payTime6.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
// this.payMethod = []
|
||||
// initPayMethod().then(response => {
|
||||
// for (let i = 0; i < response.data.length; i++) {
|
||||
// this.payMethod.push({
|
||||
// label: response.data[i].付款方式内容,
|
||||
// value: response.data[i].付款方式流水号
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// this.payTime1 = []
|
||||
// this.payTime2 = []
|
||||
// this.payTime3 = []
|
||||
// this.payTime4 = []
|
||||
// this.payTime5 = []
|
||||
// this.payTime6 = []
|
||||
// initPayTimeNode().then(response => {
|
||||
// for (let i = 0; i < response.data.length; i++) {
|
||||
// this.payTime1.push({
|
||||
// label: response.data[i].付款时间节点名称,
|
||||
// value: response.data[i].付款时间节点流水号
|
||||
// })
|
||||
// this.payTime2.push({
|
||||
// label: response.data[i].付款时间节点名称,
|
||||
// value: response.data[i].付款时间节点流水号
|
||||
// })
|
||||
// this.payTime3.push({
|
||||
// label: response.data[i].付款时间节点名称,
|
||||
// value: response.data[i].付款时间节点流水号
|
||||
// })
|
||||
// this.payTime4.push({
|
||||
// label: response.data[i].付款时间节点名称,
|
||||
// value: response.data[i].付款时间节点流水号
|
||||
// })
|
||||
// this.payTime5.push({
|
||||
// label: response.data[i].付款时间节点名称,
|
||||
// value: response.data[i].付款时间节点流水号
|
||||
// })
|
||||
// this.payTime6.push({
|
||||
// label: response.data[i].付款时间节点名称,
|
||||
// value: response.data[i].付款时间节点流水号
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
this.getSelect(initPurchaseOrder, ['请购单编号', '请购单流水号'], 'contractNum')
|
||||
},
|
||||
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
|
||||
@@ -676,8 +678,8 @@ export default {
|
||||
this.group1 = ''
|
||||
this.group2 = ''
|
||||
this.group3 = ''
|
||||
this.group5 = ''
|
||||
this.group6 = ''
|
||||
// this.group5 = ''
|
||||
// this.group6 = ''
|
||||
this.group7 = ''
|
||||
this.group8 = ''
|
||||
this.group9 = ''
|
||||
@@ -703,50 +705,50 @@ export default {
|
||||
this.RequisitionNumber = this.contractNum[i].label
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
if (this.payMethod[i].value === this.payMethodValue) {
|
||||
this.payMethodName = this.payMethod[i].label
|
||||
}
|
||||
}
|
||||
const payTimeNum = this.payMethodName.split(':')
|
||||
if (payTimeNum.length > 1) {
|
||||
for (let i = 0; i < payTimeNum.length; i++) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
this.group6 += this.payTime1Value + ','
|
||||
break
|
||||
case 1:
|
||||
this.group6 += this.payTime2Value + ','
|
||||
break
|
||||
case 2:
|
||||
this.group6 += this.payTime3Value + ','
|
||||
break
|
||||
case 3:
|
||||
this.group6 += this.payTime4Value + ','
|
||||
break
|
||||
case 4:
|
||||
this.group6 += this.payTime5Value + ','
|
||||
break
|
||||
case 5:
|
||||
this.group6 += this.payTime6Value + ','
|
||||
break
|
||||
}
|
||||
this.group5 += payTimeNum[i] + ',' // 付款比例 付款方式 付款计划
|
||||
}
|
||||
} else {
|
||||
this.group5 = '10,' // 付款比例 付款方式 付款计划
|
||||
this.group6 = this.payTime1Value + ',' // 付款时间
|
||||
}
|
||||
// for (let i = 0; i < this.payMethod.length; i++) {
|
||||
// if (this.payMethod[i].value === this.payMethodValue) {
|
||||
// this.payMethodName = this.payMethod[i].label
|
||||
// }
|
||||
// }
|
||||
// const payTimeNum = this.payMethodName.split(':')
|
||||
// if (payTimeNum.length > 1) {
|
||||
// for (let i = 0; i < payTimeNum.length; i++) {
|
||||
// switch (i) {
|
||||
// case 0:
|
||||
// this.group6 += this.payTime1Value + ','
|
||||
// break
|
||||
// case 1:
|
||||
// this.group6 += this.payTime2Value + ','
|
||||
// break
|
||||
// case 2:
|
||||
// this.group6 += this.payTime3Value + ','
|
||||
// break
|
||||
// case 3:
|
||||
// this.group6 += this.payTime4Value + ','
|
||||
// break
|
||||
// case 4:
|
||||
// this.group6 += this.payTime5Value + ','
|
||||
// break
|
||||
// case 5:
|
||||
// this.group6 += this.payTime6Value + ','
|
||||
// break
|
||||
// }
|
||||
// this.group5 += payTimeNum[i] + ',' // 付款比例 付款方式 付款计划
|
||||
// }
|
||||
// } else {
|
||||
// this.group5 = '10,' // 付款比例 付款方式 付款计划
|
||||
// this.group6 = this.payTime1Value + ',' // 付款时间
|
||||
// }
|
||||
this.group1 = this.group1.substr(0, this.group1.length - 1)
|
||||
this.group2 = this.group2.substr(0, this.group2.length - 1)
|
||||
this.group3 = this.group3.substr(0, this.group3.length - 1)
|
||||
this.group5 = this.group5.substr(0, this.group5.length - 1)
|
||||
this.group6 = this.group6.substr(0, this.group6.length - 1)
|
||||
this.group7 = this.group7.substr(0, this.group7.length - 1)
|
||||
this.group8 = this.group8.substr(0, this.group8.length - 1)
|
||||
this.group9 = this.group9.substr(0, this.group9.length - 1)
|
||||
this.group10 = this.group10.substr(0, this.group10.length - 1)
|
||||
doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.payMethodName, this.supplierValue, this.textArea, this.freight, this.group1, this.group2, this.group3, this.group5, this.group6, this.group7, this.group8, this.group9, this.id).then(response => {
|
||||
// this.group5 = this.group5.substr(0, this.group5.length - 1)
|
||||
// this.group6 = this.group6.substr(0, this.group6.length - 1)
|
||||
// this.group7 = this.group7.substr(0, this.group7.length - 1)
|
||||
// this.group8 = this.group8.substr(0, this.group8.length - 1)
|
||||
// this.group9 = this.group9.substr(0, this.group9.length - 1)
|
||||
// this.group10 = this.group10.substr(0, this.group10.length - 1)
|
||||
doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.supplierValue, this.textArea, this.freight, this.group1, this.group2, this.group3, this.group7, this.group8, this.group9, this.id, this.AdvanceCharge).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('生成合同成功')
|
||||
this.reload()
|
||||
@@ -754,59 +756,59 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
payMethodChange() { // 付款方式改变
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
if (this.payMethod[i].value === this.payMethodValue) {
|
||||
this.payMethodName = this.payMethod[i].label
|
||||
}
|
||||
}
|
||||
const payTimeNum = this.payMethodName.split(':')
|
||||
switch (payTimeNum.length) {
|
||||
case 1:
|
||||
this.disable2 = true
|
||||
this.disable3 = true
|
||||
this.disable4 = true
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 2:
|
||||
this.disable2 = false
|
||||
this.disable3 = true
|
||||
this.disable4 = true
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 3:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = true
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 4:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = false
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 5:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = false
|
||||
this.disable5 = false
|
||||
this.disable6 = true
|
||||
break
|
||||
case 6:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = false
|
||||
this.disable5 = false
|
||||
this.disable6 = false
|
||||
break
|
||||
}
|
||||
this.fetchData()
|
||||
},
|
||||
// payMethodChange() { // 付款方式改变
|
||||
// for (let i = 0; i < this.payMethod.length; i++) {
|
||||
// if (this.payMethod[i].value === this.payMethodValue) {
|
||||
// this.payMethodName = this.payMethod[i].label
|
||||
// }
|
||||
// }
|
||||
// const payTimeNum = this.payMethodName.split(':')
|
||||
// switch (payTimeNum.length) {
|
||||
// case 1:
|
||||
// this.disable2 = true
|
||||
// this.disable3 = true
|
||||
// this.disable4 = true
|
||||
// this.disable5 = true
|
||||
// this.disable6 = true
|
||||
// break
|
||||
// case 2:
|
||||
// this.disable2 = false
|
||||
// this.disable3 = true
|
||||
// this.disable4 = true
|
||||
// this.disable5 = true
|
||||
// this.disable6 = true
|
||||
// break
|
||||
// case 3:
|
||||
// this.disable2 = false
|
||||
// this.disable3 = false
|
||||
// this.disable4 = true
|
||||
// this.disable5 = true
|
||||
// this.disable6 = true
|
||||
// break
|
||||
// case 4:
|
||||
// this.disable2 = false
|
||||
// this.disable3 = false
|
||||
// this.disable4 = false
|
||||
// this.disable5 = true
|
||||
// this.disable6 = true
|
||||
// break
|
||||
// case 5:
|
||||
// this.disable2 = false
|
||||
// this.disable3 = false
|
||||
// this.disable4 = false
|
||||
// this.disable5 = false
|
||||
// this.disable6 = true
|
||||
// break
|
||||
// case 6:
|
||||
// this.disable2 = false
|
||||
// this.disable3 = false
|
||||
// this.disable4 = false
|
||||
// this.disable5 = false
|
||||
// this.disable6 = false
|
||||
// break
|
||||
// }
|
||||
// this.fetchData()
|
||||
// },
|
||||
exportExcel() {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user