This commit is contained in:
zhangdingyu
2019-09-18 10:15:45 +08:00
61 changed files with 7778 additions and 24 deletions

View File

@@ -1,7 +1,12 @@
/* eslint-disable */
require('script-loader!file-saver');
<<<<<<< HEAD
// import XLSX from 'xlsx'
import XLSX from 'xlsx-style'
=======
import XLSX from 'xlsx'
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
function generateArray(table) {
var out = [];
var rows = table.querySelectorAll('tr');
@@ -145,6 +150,7 @@ export function export_table_to_excel(id) {
}
export function export_json_to_excel({
<<<<<<< HEAD
headerGroup,
dataGroup,
sheetGroup,
@@ -213,6 +219,72 @@ export function export_json_to_excel({
wb.SheetNames.push(ws_name);
wb.Sheets[ws_name] = ws;
}
=======
multiHeader = [],
header,
data,
filename,
merges = [],
autoWidth = true,
bookType= 'xlsx'
} = {}) {
/* original data */
filename = filename || 'excel-list'
data = [...data]
data.unshift(header);
for (let i = multiHeader.length-1; i > -1; i--) {
data.unshift(multiHeader[i])
}
var ws_name = "SheetJS";
var wb = new Workbook(),
ws = sheet_from_array_of_arrays(data);
if (merges.length > 0) {
if (!ws['!merges']) ws['!merges'] = [];
merges.forEach(item => {
ws['!merges'].push(XLSX.utils.decode_range(item))
})
}
if (autoWidth) {
/*设置worksheet每列的最大宽度*/
const colWidth = data.map(row => row.map(val => {
/*先判断是否为null/undefined*/
if (val == null) {
return {
'wch': 10
};
}
/*再判断是否为中文*/
else if (val.toString().charCodeAt(0) > 255) {
return {
'wch': val.toString().length * 2
};
} else {
return {
'wch': val.toString().length
};
}
}))
/*以第一行为初始值*/
let result = colWidth[0];
for (let i = 1; i < colWidth.length; i++) {
for (let j = 0; j < colWidth[i].length; j++) {
if (result[j]['wch'] < colWidth[i][j]['wch']) {
result[j]['wch'] = colWidth[i][j]['wch'];
}
}
}
ws['!cols'] = result;
}
/* add worksheet to workbook */
wb.SheetNames.push(ws_name);
wb.Sheets[ws_name] = ws;
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
var wbout = XLSX.write(wb, {
bookType: bookType,
bookSST: false,

View File

@@ -706,11 +706,28 @@
<el-dialog :visible.sync="dialogVisible2" :title="title2" center style="min-height: 300px" width="400px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px">
<el-form-item label="询价单号" prop="inquirySheetNum">
<<<<<<< HEAD
<el-input v-model="form2.inquirySheetNum" size="small"/>
</el-form-item>
<el-form-item label="供应商" prop="supplierName">
<el-input v-model="form2.supplierName" size="small" readonly @focus="dialogVisible1=true;enterpriseNature = '';createDate = '';registeredCapital = '';taxNum = '';EMail = '';address = '';account = '';openingBank = '';phone = '';fax = '';goodTime = ''"/>
</el-form-item>
=======
<el-input v-model="form2.inquirySheetNum" readonly size="small"/>
</el-form-item>
<el-form-item label="供应商" prop="supplierNameValue">
<el-select v-model="form2.supplierNameValue" style="width:200px" placeholder="供应商" size="small" filterable>
<el-option
v-for="item in supplierNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<!--<el-form-item label="供应商" prop="supplierName">-->
<!--<el-input v-model="form2.supplierName" size="small" readonly @focus="dialogVisible1=true;enterpriseNature = '';createDate = '';registeredCapital = '';taxNum = '';EMail = '';address = '';account = '';openingBank = '';phone = '';fax = '';goodTime = ''"/>-->
<!--</el-form-item>-->
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible2=false">取消</el-button>
@@ -718,7 +735,11 @@
v-show="title2==='创建询价单'"
type="primary"
size="small"
<<<<<<< HEAD
@click="submitCreateInquirySheet">确定</el-button>
=======
@click="submitCreateInquirySheet1">确定</el-button>
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<el-button
v-show="title2==='编辑询价单'"
type="primary"
@@ -857,7 +878,11 @@
</template>
<script>
<<<<<<< HEAD
import { searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
=======
import { getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo, getExport1, getExport2, searchMerge } from '@/api/PurchasingCenter/CreateInquirySheet'
import { mapGetters } from 'vuex'
@@ -869,6 +894,10 @@ export default {
name: '', // 创建询价单
data() {
return {
<<<<<<< HEAD
=======
supplierNames: [], // 供应商下拉框
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
switchValue: false, // 物料变更列显示开关
source: [
{
@@ -992,11 +1021,21 @@ export default {
inquirySheetNumValue: '', // 询价单流水号
inquirySheetNum: '',
supplierName: '',
<<<<<<< HEAD
supplierValue: ''
},
rules2: { // 表单验证规则
inquirySheetNum: [{ required: true, message: '请填写询价单号' }],
supplierName: [{ required: true, message: '请选择供应商' }]
=======
supplierValue: '',
supplierNameValue: ''
},
rules2: { // 表单验证规则
inquirySheetNum: [{ required: true, message: '请填写询价单号' }],
supplierName: [{ required: true, message: '请选择供应商' }],
supplierNameValue: [{ required: true, message: '请选择供应商', trigger: 'change' }]
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
},
groupPartNum: [], // 组件零件流水号
groupPartBasicNum: [], // 组件零件基本件流水号
@@ -1284,6 +1323,17 @@ export default {
})
}
})
<<<<<<< HEAD
=======
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplierNames.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
},
projectChange() {
this.machine = []
@@ -1460,15 +1510,29 @@ export default {
this.pageCurrent2 = val
this.searchTable2()
},
<<<<<<< HEAD
createInquirySheet() { // 创建空单据--询价单
=======
createInquirySheet() { // 创建空单据--询价单9745
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '创建询价单'
<<<<<<< HEAD
this.form2.inquirySheetNum = ''
this.form2.supplierValue = ''
this.form2.supplierName = ''
this.dialogVisible2 = true
=======
getBillNum().then(response => { // 查询询价单号
this.form2.inquirySheetNum = response.data[0].单号
this.form2.supplierValue = ''
this.form2.supplierNameValue = ''
this.form2.supplierName = ''
this.dialogVisible2 = true
})
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
},
submitCreateInquirySheet() { // 提交创建询价单
this.$refs['form2'].validate((valid) => {
@@ -1482,7 +1546,11 @@ export default {
if (numGroup1.indexOf(this.form2.inquirySheetNum) !== -1) {
this.$message.error('该询价单号已存在')
} else {
<<<<<<< HEAD
createInquirySheet(this.form2.inquirySheetNum, this.form2.supplierValue, '', this.id).then(response => {
=======
createInquirySheet(this.form2.inquirySheetNum, this.id, this.form2.supplierValue, '').then(response => {
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
if (response.data[0].result === '1') {
this.$message.success('创建成功')
this.inquirySheetNum = ''
@@ -1500,6 +1568,27 @@ export default {
}
})
},
<<<<<<< HEAD
=======
submitCreateInquirySheet1() { // 提交创建询价单
this.$refs['form2'].validate((valid) => {
if (valid) {
createInquirySheet(this.form2.inquirySheetNum, this.id, this.form2.supplierNameValue, '').then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('创建成功')
this.form2.supplierNameValue = ''
this.inquirySheetNum = ''
this.supplierName = ''
this.supplierValue = ''
this.dialogVisible2 = false
this.searchTable2()
} else { this.$message.error('操作失败') }
})
}
})
},
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
deleteInquirySheet(row) { // 删除询价单
this.$confirm('确定删除该询价单?', '提示', {
confirmButtonText: '确定',

View File

@@ -135,13 +135,21 @@
</el-table-column>
<el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" width="120">
<template slot-scope="scope">
<<<<<<< HEAD
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:100%" @change="priceChange(scope.row.未税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
=======
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:100%" @keyup.native="scope.row.未税单价 = scope.row.未税单价.replace(/[^\.\d]/g,'')" @change="priceChange(scope.row.未税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<b v-show="hasTax!=='未税'"></b>
</template>
</el-table-column>
<el-table-column v-show="hasTax==='含税'" label="单价(含税)" align="center" width="120">
<template slot-scope="scope">
<<<<<<< HEAD
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:100%" @change="priceChange(scope.row.含税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
=======
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:100%" @keyup.native="scope.row.含税单价 = scope.row.含税单价.replace(/[^\.\d]/g,'')" @change="priceChange(scope.row.含税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<b v-show="hasTax!=='含税'"></b>
</template>
</el-table-column>
@@ -693,7 +701,11 @@ export default {
}
const merge = []
this.tableData1.map(v => {
<<<<<<< HEAD
if ((this.hasTax === '含税' && Number(v.含税单价)) || (this.hasTax === '未税' && Number(v.未税单价))) { // 筛掉未询到价格的物料
=======
if ((this.hasTax === '含税' && v.含税单价.trim() !== '') || (this.hasTax === '未税' && v.未税单价.trim() !== '')) { // 筛掉未询到价格的物料
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
merge.push({
机床图号: v.机床图号,
组号: v.组号,

View File

@@ -221,6 +221,7 @@
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
</el-form-item>
</el-col>
<<<<<<< HEAD
<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>
<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">
<el-upload
@@ -236,6 +237,23 @@
<i class="el-icon-plus"/>
</el-upload>
</el-form-item>
=======
<!--<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>-->
<!--<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">-->
<!--<el-upload-->
<!--id="invoiceScan"-->
<!--ref="upload"-->
<!--:auto-upload="false"-->
<!--:on-success="uploadSuccess"-->
<!--:before-upload="beforeUpload"-->
<!--:on-exceed="warningExceed"-->
<!--:limit="limit"-->
<!--:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&supplierValue='+form1.supplierValue+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"-->
<!--list-type="picture-card">-->
<!--<i class="el-icon-plus"/>-->
<!--</el-upload>-->
<!--</el-form-item>-->
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -316,11 +334,18 @@
</template>
<script>
<<<<<<< HEAD
import { searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
addTable2, deleteTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApplication'
import { mapGetters } from 'vuex'
import { uploadInvoiceScan, readFile } from '@/utils/request'
import request from '@/utils/request'
=======
import { insertInto, searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
addTable2, deleteTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApplication'
import { mapGetters } from 'vuex'
import { uploadInvoiceScan } from '@/utils/request'
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
export default {
name: '', // 发票结算申请
data() {
@@ -428,9 +453,22 @@ export default {
submitAdd1() { // 提交新增
this.$refs['form1'].validate((valid) => {
if (valid) {
<<<<<<< HEAD
this.$refs.upload.submit() // 上传图片
} else {
console.log('error submit!!')
=======
insertInto(this.form1.invoiceNum, this.form1.money, this.form1.supplierValue, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false
this.searchTable1()
} else {
this.$message.error('增加失败')
}
})
} else {
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
return false
}
})
@@ -448,7 +486,10 @@ export default {
} else { this.$message.error('编辑失败') }
})
} else {
<<<<<<< HEAD
console.log('error submit!!')
=======
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
return false
}
})
@@ -490,6 +531,7 @@ export default {
})
})
},
<<<<<<< HEAD
async searchPic(row, i) {
const { data } = await request({
url: '',
@@ -500,6 +542,9 @@ export default {
}
})
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
=======
searchPic(row, i) {
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
},
warningExceed() {
this.$message.error('仅可上传一张发票')

View File

@@ -2,13 +2,21 @@
<div class="app-container">
<el-card>
<el-row>
<<<<<<< HEAD
<el-col style="width: 280px;margin-top: 3px">
=======
<el-col style="width: 280px">
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<span>物料类别:</span>
<el-select
v-model="MaterialCategoryValue"
placeholder="请选择"
size="small"
clearable
<<<<<<< HEAD
=======
style="margin-bottom: 10px;"
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
@change="searchMaterialVariety">
<el-option
v-for="item in MaterialCategory"
@@ -17,13 +25,21 @@
:value="item.value"/>
</el-select>
</el-col>
<<<<<<< HEAD
<el-col style="width: 280px;margin-top: 3px">
=======
<el-col style="width: 280px">
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<span>物料品种:</span>
<el-select
v-model="MaterialVarietyValue"
placeholder="请选择"
size="small"
clearable
<<<<<<< HEAD
=======
style="margin-bottom: 10px;"
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
@change="searchMaterial">
<el-option
v-for="item in MaterialVariety"
@@ -32,32 +48,58 @@
:value="item.value"/>
</el-select>
</el-col>
<<<<<<< HEAD
<el-col style="width: 280px;margin-top: 3px">
<span>物料名称:</span>
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable />
</el-col>
<el-col style="width: 280px;margin-top: 3px">
=======
<el-col style="width: 280px">
<span>物料名称:</span>
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable style="margin-bottom: 10px;"/>
</el-col>
<el-col style="width: 280px">
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<span>物料全称:</span>
<el-input
v-model="FullNameOfMaterial"
placeholder="物料全称"
size="small"
<<<<<<< HEAD
clearable/>
</el-col>
<el-col style="width: 280px;margin-top: 3px">
=======
style="margin-bottom: 10px;"
clearable/>
</el-col>
<el-col style="width: 280px">
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<span>物料规格:</span>
<el-input
v-model="MaterialSpecification"
placeholder="物料规格"
size="small"
<<<<<<< HEAD
clearable/>
</el-col>
<el-col style="width: 280px;margin-top: 3px">
=======
style="margin-bottom: 10px;"
clearable/>
</el-col>
<el-col style="width: 280px">
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<span>物料型号:</span>
<el-input
v-model="MaterialModel"
placeholder="物料型号"
size="small"
<<<<<<< HEAD
=======
style="margin-bottom: 10px;"
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
clearable/>
</el-col>
<el-col style="width: 280px">
@@ -65,7 +107,11 @@
<el-select
v-model="MeasurementUnitValue"
placeholder="请选择"
<<<<<<< HEAD
style="margin-bottom: 3px;margin-top: 10px"
=======
style="margin-bottom: 10px;"
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
size="small"
clearable>
<el-option
@@ -80,7 +126,11 @@
<el-select
v-model="MaterialSourceValue"
placeholder="请选择"
<<<<<<< HEAD
style="margin-bottom: 3px;margin-top: 10px"
=======
style="margin-bottom: 10px;"
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
size="small"
clearable>
<el-option
@@ -96,7 +146,11 @@
v-model="supplier"
placeholder="供货商"
size="small"
<<<<<<< HEAD
style="margin-bottom: 3px;margin-top: 10px"
=======
style="margin-bottom: 10px;"
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
clearable
@dblclick.native="param=0;openSupplier()"/>
</el-col>
@@ -108,19 +162,28 @@
style="margin-left: 10px"
@click="pageCurrent=1;searchMaterial()">查询
</el-button>
<<<<<<< HEAD
<el-button :disabled="token !== 11 && token !== 36" type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
=======
<el-button :disabled="token !== 11 && token !== 36" type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<el-button
:disabled="token !== 11 && token !== 36"
type="warning"
icon="el-icon-refresh"
size="small"
<<<<<<< HEAD
style="margin:10px 10px 3px"
=======
style="margin-left: 10px"
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
@click="CategoryMaintenance">维护物料类别
</el-button>
</el-col>
</el-row>
</el-card>
<<<<<<< HEAD
<el-card>
<el-table
:data="tableData"
@@ -130,6 +193,16 @@
highlight-current-row
border
stripe>
=======
<el-card style="margin-top: 15px">
<el-table
:data="tableData"
style="width: 100%;min-height: 500px"
height="500"
size="mini"
highlight-current-row
border>
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<el-table-column align="center" label="物料名称">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
@@ -155,6 +228,7 @@
{{ scope.row.参考价格 }}
</template>
</el-table-column>
<<<<<<< HEAD
<el-table-column label="操作" fixed="right" align="center" width="150">
<template slot-scope="scope">
<el-tooltip effect="dark" content="编辑" placement="top">
@@ -178,6 +252,24 @@
@click="handleDelete(scope.row)"/>
</div>
</el-tooltip>
=======
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<el-button
:disabled="token !== 11 && token !== 36"
size="mini"
type="primary"
icon="el-icon-edit"
@click="handleEdit(scope.row)">编辑
</el-button>
<el-button
:disabled="token !== 11 && token !== 36"
size="mini"
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)">删除
</el-button>
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
</template>
</el-table-column>
</el-table>
@@ -498,7 +590,11 @@ export default {
param: 0,
tableData: [],
pageCurrent: 1,
<<<<<<< HEAD
pageSize: 30,
=======
pageSize: 10,
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
total: null,
tableData1: [],
pageCurrent1: 1,

View File

@@ -157,6 +157,16 @@
{{ scope.row.审批时间 ? scope.row.审核时间 : '—' }}
</template>
</el-table-column>
<<<<<<< HEAD
=======
<el-table-column label="处理" align="center" min-width="130">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否未通过)===1&&Number(scope.row.不通过处理)===1" type="success" size="small">处理完成</el-tag>
<el-button v-else-if="Number(scope.row.是否未通过)===1&&Number(scope.row.不通过处理)===0" type="primary" size="mini" @click="done(scope.row)">点击处理完成</el-button>
<span v-else></span>
</template>
</el-table-column>
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<el-table-column label="采购员" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.姓名 }}
@@ -195,7 +205,11 @@
</template>
<script>
<<<<<<< HEAD
import { initContract, initBuyer, searchTable1, searchTable2, deleteContract } from '@/api/PurchasingCenter/PurchaseContractSearch'
=======
import { initContract, initBuyer, searchTable1, searchTable2, deleteContract, handleDone } from '@/api/PurchasingCenter/PurchaseContractSearch'
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
import QRCode from 'qrcode'
import $ from 'jquery'
// import { exportExcelMethod } from './exportExcel'
@@ -270,6 +284,29 @@ export default {
this.searchTable1()
},
methods: {
<<<<<<< HEAD
=======
// 处理完成
done(row) {
this.$confirm('确定处理完成?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
handleDone(row.采购合同流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable1()
} else { this.$message.error('操作失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
deleteContract(row) { // 删除合同
this.$confirm('此操作将永久删除合同所有内容,确定删除?', '提示', {
confirmButtonText: '确定',

View File

@@ -1,7 +1,11 @@
<template>
<div class="app-container">
<el-card>
<<<<<<< HEAD
<el-table :data="tableData1" highlight-current-row height="810" style="width: 100%;" size="mini" border stripe>
=======
<el-table :data="tableData1" highlight-current-row height="550" style="width: 100%;" size="mini" border>
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
<el-table-column label="序号" type="index" align="center" width="50"/>
<el-table-column label="项目名称" align="center" width="200px">
<template slot-scope="scope">
@@ -89,7 +93,11 @@ export default {
loading1: false,
tableData1: [], // 表格数据
total1: null, // 总条数
<<<<<<< HEAD
pageSize1: 30, // 每页显示条数
=======
pageSize1: 10, // 每页显示条数
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
pageCurrent1: 1
}
},