add:采购单据打印
opt:采购单转发中鼎优化
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">强制回传</el-button>
|
||||
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">下发回传单</el-button>
|
||||
<el-button slot="right" class="filter-item" type="primary" icon="el-icon-printer" size="mini" :disabled="audit_flag" @click="printBill">打印</el-button>
|
||||
</crudOperation>
|
||||
<el-table ref="table" v-loading="crud.loading" size="mini" :data="crud.data" highlight-current-row style="width: 100%;" @selection-change="crud.selectionChangeHandler" @current-change="handleCurrentChange" @select="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
@@ -47,6 +48,35 @@
|
||||
<el-table-column label="明细数" align="center" prop="dtl_count" width="80" />
|
||||
<el-table-column label="单据总数" align="center" prop="total_qty" width="80" />
|
||||
<el-table-column label="入库数量" align="center" prop="instock_qty" width="80" />
|
||||
<el-table-column label="转发中鼎" align="center" prop="forwardZD" width="80">
|
||||
<template slot-scope="scope">
|
||||
<p v-if="scope.row.forwardZD == '0'">-</p>
|
||||
<template v-else-if="scope.row.forwardZD == '1'">
|
||||
<el-popconfirm
|
||||
confirm-button-text='是'
|
||||
cancel-button-text='否'
|
||||
icon="el-icon-info"
|
||||
icon-color="red"
|
||||
title="是否重新转发中鼎?"
|
||||
@confirm="toForwardZD"
|
||||
>
|
||||
<a slot="reference" style="color: red;text-decoration: underline">失败</a>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
<!-- <a style="color: red;text-decoration: underline" v-else-if="scope.row.forwardZD == '1'">-->
|
||||
<!-- <el-popconfirm-->
|
||||
<!-- class="box-item"-->
|
||||
<!-- title="是否重新转发?"-->
|
||||
<!-- placement="top-start"-->
|
||||
<!-- >-->
|
||||
<!-- <template #reference>-->
|
||||
<!-- 失败-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-popconfirm>-->
|
||||
<!-- </a>-->
|
||||
<p v-else>成功</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="supplier_code" width="120" label="供应商编码" />
|
||||
<el-table-column show-overflow-tooltip prop="supplier_name" width="150" label="供应商名称" />
|
||||
<el-table-column show-overflow-tooltip prop="creator" width="100" label="创建人" />
|
||||
@@ -136,6 +166,9 @@ export default {
|
||||
const s = String(d.getSeconds()).padStart(2, '0')
|
||||
return y + '-' + m + '-' + day + ' ' + h + ':' + min + ':' + s
|
||||
},
|
||||
toForwardZD(){
|
||||
console.log(123)
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
@@ -182,6 +215,26 @@ export default {
|
||||
this.crud.notify('下发失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
printBill() {
|
||||
const selections = this.crud.selections
|
||||
if (!selections || selections.length === 0) {
|
||||
this.crud.notify('请至少选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const ids = selections.map(s => s.id)
|
||||
const billIds = selections.map(s => s.bill_id).join('、')
|
||||
this.$confirm('确认打印以下单据的物料标签?\n' + billIds, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudPurchase.print(ids).then(() => {
|
||||
this.crud.notify('打印指令已发送', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.crud.notify('打印失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user