a
This commit is contained in:
@@ -11,18 +11,18 @@ export function initSupplier() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// export function initSupplier(num) {
|
export function initSupplier11(num) {
|
||||||
// return request({
|
return request({
|
||||||
// url: '',
|
url: '',
|
||||||
// method: 'post',
|
method: 'post',
|
||||||
// data: {
|
data: {
|
||||||
// type: '3',
|
type: '3',
|
||||||
// name: `SELECT distinct 供应商流水号,供应商名称
|
name: ` SELECT distinct 供应商流水号,供应商名称
|
||||||
// FROM 采购管理_询价单_视图
|
FROM 采购管理_询价单_视图
|
||||||
// where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and 是否未通过 is null and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}`
|
where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and 是否未通过 is null and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}`
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
// 查询询价单列表 表1
|
// 查询询价单列表 表1
|
||||||
export function searchInquirySheet(check1, value1, check2, value2, check3, id, check4, supplier) {
|
export function searchInquirySheet(check1, value1, check2, value2, check3, id, check4, supplier) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFil
|
|||||||
export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx`
|
export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx`
|
||||||
export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx`
|
export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx`
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: `http://192.168.0.110:8005/submit/MESCommonBase.ashx`,
|
baseURL: `http://192.168.0.110:8002/submit/MESCommonBase.ashx`,
|
||||||
timeout: 1500000 // 请求超时时间
|
timeout: 1500000 // 请求超时时间
|
||||||
})
|
})
|
||||||
export default service
|
export default service
|
||||||
|
|||||||
@@ -3,6 +3,17 @@
|
|||||||
<el-card>
|
<el-card>
|
||||||
<el-form label-width="90px" label-position="right">
|
<el-form label-width="90px" label-position="right">
|
||||||
<el-row>
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="供应商:">
|
||||||
|
<el-select v-model="supplierValue11" clearable filterable size="small" placeholder="供应商" style="width:100%" @focus="fetchData11()" @change="selectHetong()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in supplier11"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="合同编号:">
|
<el-form-item label="合同编号:">
|
||||||
<el-select v-model="contractNumValue" filterable size="small" placeholder="合同编号" style="width:100%" @change="contractChange">
|
<el-select v-model="contractNumValue" filterable size="small" placeholder="合同编号" style="width:100%" @change="contractChange">
|
||||||
@@ -14,6 +25,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="供应商:">
|
<el-form-item label="供应商:">
|
||||||
<!--<el-select v-model="supplierValue" clearable filterable size="small" placeholder="供应商" style="width:100%" @focus="fetchData" @change="supplierChange">-->
|
<!--<el-select v-model="supplierValue" clearable filterable size="small" placeholder="供应商" style="width:100%" @focus="fetchData" @change="supplierChange">-->
|
||||||
@@ -163,20 +176,20 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-tooltip :open-delay="1000" content="一键删除交货期" placement="right">
|
<!--<el-tooltip :open-delay="1000" content="一键删除交货期" placement="right">-->
|
||||||
<el-button type="danger" icon="el-icon-date" size="small" @click="deleteAllDate()"/>
|
<!--<el-button type="danger" icon="el-icon-date" size="small" @click="deleteAllDate()"/>-->
|
||||||
</el-tooltip>
|
<!--</el-tooltip>-->
|
||||||
<span>①选择合同模板:</span>
|
<!--<span>①选择合同模板:</span>-->
|
||||||
<el-radio-group v-model="demoRadio" size="small" @change="demoChange">
|
<!--<el-radio-group v-model="demoRadio" size="small" @change="demoChange">-->
|
||||||
<el-radio-button label="模板1"/>
|
<!--<el-radio-button label="模板1"/>-->
|
||||||
<el-radio-button label="模板2" disabled/>
|
<!--<el-radio-button label="模板2" disabled/>-->
|
||||||
<!--<el-radio-button label="自定义" disabled/>-->
|
<!--<!–<el-radio-button label="自定义" disabled/>–>-->
|
||||||
</el-radio-group>
|
<!--</el-radio-group>-->
|
||||||
<el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">预览合同</el-button>
|
<!--<el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">预览合同</el-button>-->
|
||||||
<!--<span>②确认合同总额:</span>-->
|
<!--<span>②确认合同总额:</span>-->
|
||||||
<!--<el-input v-model="actualTotal" size="small" style="width: 100px"/>-->
|
<!--<el-input v-model="actualTotal" size="small" style="width: 100px"/>-->
|
||||||
<!--<el-button type="primary" size="small" @click="submitTotal()">确认</el-button>-->
|
<!--<el-button type="primary" size="small" @click="submitTotal()">确认</el-button>-->
|
||||||
<span>②递交审批:</span>
|
<span>递交审批:</span>
|
||||||
<el-tooltip :open-delay="1000" effect="dark" content="核对信息后生成合同" placement="top">
|
<el-tooltip :open-delay="1000" effect="dark" content="核对信息后生成合同" placement="top">
|
||||||
<el-button type="success" size="small" @click="generateContract()">递交</el-button>
|
<el-button type="success" size="small" @click="generateContract()">递交</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@@ -195,7 +208,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Tinymce from '@/components/Tinymce'
|
import Tinymce from '@/components/Tinymce'
|
||||||
import { initSupplier, searchInquirySheet, searchSheetContract, doneContract, searchBaseInfo, savePrice, saveContractHeader, searchContractHeader, saveRemark } from '@/api/PurchasingCenter/CreatePurchaseContract'
|
import { initSupplier11, initSupplier, searchInquirySheet, searchSheetContract, doneContract, searchBaseInfo, savePrice, saveContractHeader, searchContractHeader, saveRemark } from '@/api/PurchasingCenter/CreatePurchaseContract'
|
||||||
import { convertCurrency } from '@/vendor/int2Chinese'
|
import { convertCurrency } from '@/vendor/int2Chinese'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { sleep, groupBy } from '@/utils/tool'
|
import { sleep, groupBy } from '@/utils/tool'
|
||||||
@@ -206,6 +219,8 @@ export default {
|
|||||||
inject: ['reload'],
|
inject: ['reload'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
supplierValue11: '', // 供应商查询条件
|
||||||
|
supplier11: [],
|
||||||
quickChangePrice: true,
|
quickChangePrice: true,
|
||||||
supplier: [],
|
supplier: [],
|
||||||
year: '',
|
year: '',
|
||||||
@@ -267,14 +282,49 @@ export default {
|
|||||||
])
|
])
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.fetchData11()
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
this.initDirection()
|
this.initDirection()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
fetchData11() {
|
||||||
|
initSupplier11(this.id).then(res => {
|
||||||
|
this.supplier11 = []
|
||||||
|
for (let i = 0; i < res.data.length; i++) {
|
||||||
|
this.supplier11.push({
|
||||||
|
value: res.data[i].供应商流水号,
|
||||||
|
label: res.data[i].供应商名称
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectHetong() {
|
||||||
|
this.contractNumValue = ''
|
||||||
|
if (this.supplierValue11) { this.asdasd = 1 } else { this.asdasd = 0 }
|
||||||
|
searchInquirySheet(0, 0, 0, 0, 1, this.id, this.asdasd, this.supplierValue11).then(response => { // 初始化询价单号
|
||||||
|
this.contractNums = []
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.contractNums.push({
|
||||||
|
value: response.data[i].询价单流水号,
|
||||||
|
label: response.data[i].询价单编号,
|
||||||
|
supplierName: response.data[i].供应商名称,
|
||||||
|
supplierValue: response.data[i].供应商流水号,
|
||||||
|
supplierAddress: response.data[i].地址,
|
||||||
|
legalPerson: response.data[i].企业性质, // 法人
|
||||||
|
trustee: response.data[i].注册资本 || '', // 受托人
|
||||||
|
bank1: response.data[i].开户行 || '', // 开户行
|
||||||
|
account1: response.data[i].帐号 || '', // 帐号
|
||||||
|
taxCode1: response.data[i].税号 || '', // 税号
|
||||||
|
phone1: response.data[i].电话号码 || '', // 电话
|
||||||
|
fax1: response.data[i].传真 || '', // 传真
|
||||||
|
postCode1: response.data[i].货期 || '' // 邮编
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
initDirection() {
|
initDirection() {
|
||||||
const direction = this.$getDirection()
|
const direction = this.$getDirection()
|
||||||
direction.on('keyup', function(e, val) {
|
direction.on('keyup', function(e, val) {
|
||||||
console.log(val)
|
|
||||||
if (e.keyCode === 39) {
|
if (e.keyCode === 39) {
|
||||||
direction.next()
|
direction.next()
|
||||||
}
|
}
|
||||||
@@ -371,7 +421,6 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchData() {
|
fetchData() {
|
||||||
initSupplier(this.id).then(res => {
|
initSupplier(this.id).then(res => {
|
||||||
// this.id
|
|
||||||
this.supplier = []
|
this.supplier = []
|
||||||
for (let i = 0; i < res.data.length; i++) {
|
for (let i = 0; i < res.data.length; i++) {
|
||||||
this.supplier.push({
|
this.supplier.push({
|
||||||
@@ -509,6 +558,8 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.demo1()
|
||||||
|
this.editContract()
|
||||||
},
|
},
|
||||||
demoChange() { // 模板change
|
demoChange() { // 模板change
|
||||||
switch (this.demoRadio) {
|
switch (this.demoRadio) {
|
||||||
@@ -678,8 +729,8 @@ export default {
|
|||||||
this.day = date.getDate()
|
this.day = date.getDate()
|
||||||
this.demoChange()
|
this.demoChange()
|
||||||
await sleep(0)
|
await sleep(0)
|
||||||
if (this.contractNumValue) {
|
// if (this.contractNumValue) {
|
||||||
if (this.demoRadio) {
|
// if (this.demoRadio) {
|
||||||
// this.$refs.tinymce.destroyTinymce()
|
// this.$refs.tinymce.destroyTinymce()
|
||||||
document.getElementById('contractName') ? document.getElementById('contractName').innerHTML = this.contractName : ''
|
document.getElementById('contractName') ? document.getElementById('contractName').innerHTML = this.contractName : ''
|
||||||
document.getElementById('contractNum') ? document.getElementById('contractNum').innerHTML = this.contractNum : ''
|
document.getElementById('contractNum') ? document.getElementById('contractNum').innerHTML = this.contractNum : ''
|
||||||
@@ -772,12 +823,12 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$refs.tinymce.setContent(this.contentNew)
|
this.$refs.tinymce.setContent(this.contentNew)
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else {
|
// } else {
|
||||||
this.$message.warning('请先选择合同模板,再预览')
|
// this.$message.warning('请先选择合同模板,再预览')
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
this.$message.warning('请先选择合同,再预览')
|
// this.$message.warning('请先选择合同,再预览')
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
demo2() {
|
demo2() {
|
||||||
this.content = `demo2`
|
this.content = `demo2`
|
||||||
@@ -808,8 +859,8 @@ export default {
|
|||||||
inquiryDetailNum_old.push(v.询价单明细流水号)
|
inquiryDetailNum_old.push(v.询价单明细流水号)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (this.contractNumValue) {
|
// if (this.contractNumValue) {
|
||||||
if (this.demoRadio) {
|
// if (this.demoRadio) {
|
||||||
this.$confirm('此采购合同将递交审批,递交后该合同不可删除,确认完成编辑?', '提示', {
|
this.$confirm('此采购合同将递交审批,递交后该合同不可删除,确认完成编辑?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
@@ -829,12 +880,12 @@ export default {
|
|||||||
message: '已取消操作'
|
message: '已取消操作'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
// } else {
|
||||||
this.$message.warning('请先选择模板进行预览')
|
// this.$message.warning('请先选择模板进行预览')
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
this.$message.warning('请先选择合同进行编辑')
|
// this.$message.warning('请先选择合同进行编辑')
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user