opt:采购单回传逻辑统一走回传单
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
</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="forceAudit">强制回传</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>
|
||||
</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" />
|
||||
@@ -60,8 +60,8 @@
|
||||
{{ formatDate(scope.row.modify_date) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" :formatter="auditStatusFormat" width="100" label="审核状态" />
|
||||
<el-table-column show-overflow-tooltip prop="audit_msg" width="150" label="审核信息" />
|
||||
<!-- <el-table-column prop="status" :formatter="auditStatusFormat" width="100" label="审核状态" />-->
|
||||
<!-- <el-table-column show-overflow-tooltip prop="audit_msg" width="150" label="审核信息" />-->
|
||||
</el-table>
|
||||
<pagination />
|
||||
</div>
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
forceAudit() {
|
||||
issueReturnBill() {
|
||||
const selections = this.crud.selections
|
||||
if (!selections || selections.length === 0) {
|
||||
this.crud.notify('请至少选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
@@ -172,16 +172,16 @@ export default {
|
||||
}
|
||||
const ids = selections.map(s => s.id)
|
||||
const billIds = selections.map(s => s.bill_id).join('、')
|
||||
this.$confirm('确认将以下单据强制回传EAS审核?\n' + billIds, '提示', {
|
||||
this.$confirm('确认下发以下单据的回传单?\n' + billIds, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudPurchase.forceAudit(ids).then(() => {
|
||||
this.crud.notify('回传完成', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
crudPurchase.issueReturnBill(ids).then(() => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.crud.notify('回传失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
this.crud.notify('下发失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
|
||||
@@ -31,12 +31,12 @@ export function get(id) {
|
||||
})
|
||||
}
|
||||
|
||||
export function forceAudit(data) {
|
||||
export function issueReturnBill(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst/forceAudit',
|
||||
url: '/api/purchasemst/issueReturnBill',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, get, forceAudit }
|
||||
export default { add, edit, del, get, issueReturnBill }
|
||||
|
||||
Reference in New Issue
Block a user