创建采购合同

This commit is contained in:
zhangdingyu
2019-10-16 18:13:28 +08:00
parent 2fa617dbda
commit 031572447c

View File

@@ -176,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 v-show="false" :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-show="false" 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/>
<!--&lt;!&ndash;<el-radio-button label="自定义" disabled/>&ndash;&gt;--> <!--<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>
@@ -242,7 +242,7 @@ export default {
hasTax: '含税', hasTax: '含税',
taxRate: 0.13, taxRate: 0.13,
preview: false, // 预览 preview: false, // 预览
demoRadio: '', // 模板radio demoRadio: '模板1', // 模板radio
content: ``, // 合同格式模板 content: ``, // 合同格式模板
contentNew: ``, // tinymce的 contentNew: ``, // tinymce的
contractName: '采购合同', // 合同名称 contractName: '采购合同', // 合同名称
@@ -285,6 +285,7 @@ export default {
this.fetchData11() this.fetchData11()
this.fetchData() this.fetchData()
this.initDirection() this.initDirection()
this.demo1()
}, },
methods: { methods: {
fetchData11() { fetchData11() {
@@ -300,6 +301,7 @@ export default {
}, },
selectHetong() { selectHetong() {
this.contractNumValue = '' this.contractNumValue = ''
this.tableData1 = []
if (this.supplierValue11) { this.asdasd = 1 } else { this.asdasd = 0 } if (this.supplierValue11) { this.asdasd = 1 } else { this.asdasd = 0 }
searchInquirySheet(0, 0, 0, 0, 1, this.id, this.asdasd, this.supplierValue11).then(response => { // 初始化询价单号 searchInquirySheet(0, 0, 0, 0, 1, this.id, this.asdasd, this.supplierValue11).then(response => { // 初始化询价单号
this.contractNums = [] this.contractNums = []
@@ -421,6 +423,7 @@ 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({
@@ -558,8 +561,6 @@ export default {
}) })
} }
}) })
this.demo1()
this.editContract()
}, },
demoChange() { // 模板change demoChange() { // 模板change
switch (this.demoRadio) { switch (this.demoRadio) {
@@ -729,8 +730,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 : ''
@@ -823,12 +824,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`
@@ -859,8 +860,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: '取消',
@@ -880,12 +881,12 @@ export default {
message: '已取消操作' message: '已取消操作'
}) })
}) })
// } else { } else {
// this.$message.warning('请先选择模板进行预览') this.$message.warning('请先选择模板进行预览')
// } }
// } else { } else {
// this.$message.warning('请先选择合同进行编辑') this.$message.warning('请先选择合同进行编辑')
// } }
} }
} }
} }