|
|
@ -92,17 +92,12 @@ |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" align="center" width="50"/> |
|
|
|
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/> |
|
|
|
<el-table-column label="是否可出厂" align="center" width="130"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.outDoorState == '1' ? '是' : scope.row.outDoorState == '0' ? '否' :'' }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="isOutFactory" label="是否可出厂" align="center" width="150" /> |
|
|
|
<el-table-column label="单据编号" align="center" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="bluezi" @click="toInfo(scope.row)">{{ scope.row.billNo }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="nodeName" label="环节" align="center" width="80" /> |
|
|
|
<el-table-column prop="useOrgName" label="分公司" align="center" width="120" /> |
|
|
|
<el-table-column prop="dept" label="制单部门" align="center" width="120" /> |
|
|
|
<el-table-column prop="createByName" label="制单人" align="center" width="120" /> |
|
|
@ -172,6 +167,13 @@ export default { |
|
|
|
return { |
|
|
|
btndisabled: false, |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
|
icon: '', |
|
|
|
btnKey: 'toAffirm', |
|
|
|
btnLabel: '出厂确认' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
@ -277,6 +279,9 @@ export default { |
|
|
|
btnHandle(btnKey) { |
|
|
|
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|
|
|
switch (btnKey) { |
|
|
|
case 'toAffirm': |
|
|
|
this.toAffirm() |
|
|
|
break |
|
|
|
case 'toPrint': |
|
|
|
this.toPrint() |
|
|
|
break |
|
|
@ -308,11 +313,10 @@ export default { |
|
|
|
// 查询列表信息 |
|
|
|
getList() { |
|
|
|
this.listLoading = true |
|
|
|
this.listQuery.params.nodeCode = '6' |
|
|
|
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
this.listQuery.params.menuUrl = this.$route.path |
|
|
|
req.listPage(this.listQuery).then(response => { |
|
|
|
req.listPageCC(this.listQuery).then((response) => { |
|
|
|
this.listLoading = false |
|
|
|
if (response.success) { |
|
|
|
this.list = response.data.records |
|
|
@ -364,9 +368,44 @@ export default { |
|
|
|
} |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
toAffirm() { |
|
|
|
if (this.sids.length > 0) { |
|
|
|
for (var i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
if (this.multipleSelection[i].isOutFactory === '否') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择是否可出厂为是的记录进行操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行操作' }) |
|
|
|
} |
|
|
|
const tip = '请确认是否出厂所选 ' + this.sids.length + ' 条记录?' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
req.carOutFactory(this.sids).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '操作成功' }) |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
loading.close() |
|
|
|
}).catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
toPrint() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
if (this.multipleSelection[0].outDoorState === '1') { |
|
|
|
if (this.multipleSelection[0].isOutFactory === '是') { |
|
|
|
req.printCard({ sid: this.sids[0] }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
var xhr = new XMLHttpRequest() |
|
|
|