a
This commit is contained in:
@@ -11,18 +11,18 @@ export function initSupplier() {
|
||||
}
|
||||
})
|
||||
}
|
||||
// export function initSupplier(num) {
|
||||
// return request({
|
||||
// url: '',
|
||||
// method: 'post',
|
||||
// data: {
|
||||
// type: '3',
|
||||
// name: `SELECT distinct 供应商流水号,供应商名称
|
||||
// FROM 采购管理_询价单_视图
|
||||
// where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and 是否未通过 is null and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}`
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
export function initSupplier11(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: ` SELECT distinct 供应商流水号,供应商名称
|
||||
FROM 采购管理_询价单_视图
|
||||
where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and 是否未通过 is null and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询询价单列表 表1
|
||||
export function searchInquirySheet(check1, value1, check2, value2, check3, id, check4, supplier) {
|
||||
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 MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx`
|
||||
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 // 请求超时时间
|
||||
})
|
||||
export default service
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
<el-card>
|
||||
<el-form label-width="90px" label-position="right">
|
||||
<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-form-item label="合同编号:">
|
||||
<el-select v-model="contractNumValue" filterable size="small" placeholder="合同编号" style="width:100%" @change="contractChange">
|
||||
@@ -14,6 +25,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="供应商:">
|
||||
<!--<el-select v-model="supplierValue" clearable filterable size="small" placeholder="供应商" style="width:100%" @focus="fetchData" @change="supplierChange">-->
|
||||
@@ -163,20 +176,20 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-tooltip :open-delay="1000" content="一键删除交货期" placement="right">
|
||||
<el-button type="danger" icon="el-icon-date" size="small" @click="deleteAllDate()"/>
|
||||
</el-tooltip>
|
||||
<span>①选择合同模板:</span>
|
||||
<el-radio-group v-model="demoRadio" size="small" @change="demoChange">
|
||||
<el-radio-button label="模板1"/>
|
||||
<el-radio-button label="模板2" disabled/>
|
||||
<!--<el-radio-button label="自定义" disabled/>-->
|
||||
</el-radio-group>
|
||||
<el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">预览合同</el-button>
|
||||
<!--<el-tooltip :open-delay="1000" content="一键删除交货期" placement="right">-->
|
||||
<!--<el-button type="danger" icon="el-icon-date" size="small" @click="deleteAllDate()"/>-->
|
||||
<!--</el-tooltip>-->
|
||||
<!--<span>①选择合同模板:</span>-->
|
||||
<!--<el-radio-group v-model="demoRadio" size="small" @change="demoChange">-->
|
||||
<!--<el-radio-button label="模板1"/>-->
|
||||
<!--<el-radio-button label="模板2" disabled/>-->
|
||||
<!--<!–<el-radio-button label="自定义" disabled/>–>-->
|
||||
<!--</el-radio-group>-->
|
||||
<!--<el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">预览合同</el-button>-->
|
||||
<!--<span>②确认合同总额:</span>-->
|
||||
<!--<el-input v-model="actualTotal" size="small" style="width: 100px"/>-->
|
||||
<!--<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-button type="success" size="small" @click="generateContract()">递交</el-button>
|
||||
</el-tooltip>
|
||||
@@ -195,7 +208,7 @@
|
||||
|
||||
<script>
|
||||
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 { mapGetters } from 'vuex'
|
||||
import { sleep, groupBy } from '@/utils/tool'
|
||||
@@ -206,6 +219,8 @@ export default {
|
||||
inject: ['reload'],
|
||||
data() {
|
||||
return {
|
||||
supplierValue11: '', // 供应商查询条件
|
||||
supplier11: [],
|
||||
quickChangePrice: true,
|
||||
supplier: [],
|
||||
year: '',
|
||||
@@ -267,14 +282,49 @@ export default {
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData11()
|
||||
this.fetchData()
|
||||
this.initDirection()
|
||||
},
|
||||
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() {
|
||||
const direction = this.$getDirection()
|
||||
direction.on('keyup', function(e, val) {
|
||||
console.log(val)
|
||||
if (e.keyCode === 39) {
|
||||
direction.next()
|
||||
}
|
||||
@@ -371,7 +421,6 @@ export default {
|
||||
},
|
||||
fetchData() {
|
||||
initSupplier(this.id).then(res => {
|
||||
// this.id
|
||||
this.supplier = []
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
this.supplier.push({
|
||||
@@ -509,6 +558,8 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
this.demo1()
|
||||
this.editContract()
|
||||
},
|
||||
demoChange() { // 模板change
|
||||
switch (this.demoRadio) {
|
||||
@@ -678,8 +729,8 @@ export default {
|
||||
this.day = date.getDate()
|
||||
this.demoChange()
|
||||
await sleep(0)
|
||||
if (this.contractNumValue) {
|
||||
if (this.demoRadio) {
|
||||
// if (this.contractNumValue) {
|
||||
// if (this.demoRadio) {
|
||||
// this.$refs.tinymce.destroyTinymce()
|
||||
document.getElementById('contractName') ? document.getElementById('contractName').innerHTML = this.contractName : ''
|
||||
document.getElementById('contractNum') ? document.getElementById('contractNum').innerHTML = this.contractNum : ''
|
||||
@@ -772,12 +823,12 @@ export default {
|
||||
setTimeout(() => {
|
||||
this.$refs.tinymce.setContent(this.contentNew)
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$message.warning('请先选择合同模板,再预览')
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择合同,再预览')
|
||||
}
|
||||
// } else {
|
||||
// this.$message.warning('请先选择合同模板,再预览')
|
||||
// }
|
||||
// } else {
|
||||
// this.$message.warning('请先选择合同,再预览')
|
||||
// }
|
||||
},
|
||||
demo2() {
|
||||
this.content = `demo2`
|
||||
@@ -808,8 +859,8 @@ export default {
|
||||
inquiryDetailNum_old.push(v.询价单明细流水号)
|
||||
}
|
||||
})
|
||||
if (this.contractNumValue) {
|
||||
if (this.demoRadio) {
|
||||
// if (this.contractNumValue) {
|
||||
// if (this.demoRadio) {
|
||||
this.$confirm('此采购合同将递交审批,递交后该合同不可删除,确认完成编辑?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -829,12 +880,12 @@ export default {
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请先选择模板进行预览')
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择合同进行编辑')
|
||||
}
|
||||
// } else {
|
||||
// this.$message.warning('请先选择模板进行预览')
|
||||
// }
|
||||
// } else {
|
||||
// this.$message.warning('请先选择合同进行编辑')
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user