opt:下推时增加状态校验,统一bill_status子独昂数据
This commit is contained in:
@@ -27,8 +27,8 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation>
|
||||
<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="success" icon="el-icon-s-promotion" size="mini" :disabled="!multipleSelection.length || multipleSelection.length>1" @click="handleBatchPush">下推出库</el-button>
|
||||
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">强制回传EAS</el-button>
|
||||
<el-button slot="right" class="filter-item" type="success" icon="el-icon-s-promotion" size="mini" :disabled="isPushDisabled()" @click="handleBatchPush">下推出库</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" />
|
||||
@@ -44,7 +44,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="order_no" width="150" label="订单号" />
|
||||
<el-table-column show-overflow-tooltip prop="order_type" width="100" label="订单类型" />
|
||||
<el-table-column :formatter="billStatusFormat" prop="bill_status" width="100" label="单据状态" />
|
||||
<el-table-column prop="bill_status" label="单据状态" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="statusTagType(scope.row.bill_status)" size="mini">{{ billStatusFormat(scope.row.bill_status) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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" />
|
||||
@@ -124,9 +128,24 @@ export default {
|
||||
canUd(row) {
|
||||
return row.bill_status !== '0'
|
||||
},
|
||||
billStatusFormat(row) {
|
||||
const map = { '0': '已创建', '1': '执行中', '2': '已完成' }
|
||||
return map[row.bill_status] || row.bill_status
|
||||
isPushDisabled() {
|
||||
// 没有选中、选中多行、或选中的行状态不是 '0' 时禁用
|
||||
if (this.multipleSelection.length !== 1) return true
|
||||
return this.multipleSelection[0].bill_status !== '0'
|
||||
},
|
||||
statusTagType(status) {
|
||||
const map = { '0': 'warning', '1': 'primary', '2': 'success' }
|
||||
return map[String(status)] || ''
|
||||
},
|
||||
billStatusFormat(bill_status) {
|
||||
const map = {
|
||||
'0': '已创建',
|
||||
'1': '下发',
|
||||
'2': '完成',
|
||||
'3': '审核成功',
|
||||
'4': '审核失败'
|
||||
};
|
||||
return map[bill_status] || bill_status
|
||||
},
|
||||
auditStatusFormat(row) {
|
||||
const map = { '0': '未审核', '1': '已审核' }
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation :permission="permission" >
|
||||
<el-button slot="right" class="filter-item" type="success" icon="el-icon-s-promotion" size="mini" :disabled="!multipleSelection.length" @click="handleBatchPush">下推出库</el-button>
|
||||
<el-button slot="right" class="filter-item" type="success" icon="el-icon-s-promotion" size="mini" :disabled="isPushDisabled()" @click="handleBatchPush">下推出库</el-button>
|
||||
</crudOperation>
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="900px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" label-suffix=":" style="border: 1px solid #cfe0df;margin-top: 10px;padding: 10px;">
|
||||
@@ -165,6 +165,11 @@ export default {
|
||||
this.query.endTime = ''
|
||||
}
|
||||
},
|
||||
isPushDisabled() {
|
||||
// 没有选中、选中多行、或选中的行状态不是 '0' 时禁用
|
||||
if (this.multipleSelection.length !== 1) return true
|
||||
return this.multipleSelection[0].status !== '01'
|
||||
},
|
||||
statusLabel(status) {
|
||||
const target = this.statusOptions.find(item => String(item.value) === String(status))
|
||||
return target ? target.label : status
|
||||
|
||||
@@ -27,8 +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="success" icon="el-icon-s-promotion" size="mini" :disabled="!multipleSelection.length || multipleSelection.length>1" @click="handleBatchPush">下推出库</el-button>
|
||||
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">强制回传EAS</el-button>
|
||||
<el-button slot="right" class="filter-item" type="success" icon="el-icon-s-promotion" size="mini" :disabled="isPushDisabled()" @click="handleBatchPush">下推出库</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" />
|
||||
@@ -44,7 +44,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="order_no" width="150" label="订单号" />
|
||||
<el-table-column show-overflow-tooltip prop="order_type" width="100" label="订单类型" />
|
||||
<el-table-column :formatter="billStatusFormat" prop="bill_status" width="100" label="单据状态" />
|
||||
<el-table-column prop="bill_status" label="单据状态" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="statusTagType(scope.row.bill_status)" size="mini">{{ billStatusFormat(scope.row.bill_status) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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" />
|
||||
@@ -123,9 +127,24 @@ export default {
|
||||
canUd(row) {
|
||||
return row.bill_status !== '0'
|
||||
},
|
||||
billStatusFormat(row) {
|
||||
const map = { '0': '已创建', '1': '执行中', '2': '已完成' }
|
||||
return map[row.bill_status] || row.bill_status
|
||||
isPushDisabled() {
|
||||
// 没有选中、选中多行、或选中的行状态不是 '0' 时禁用
|
||||
if (this.multipleSelection.length !== 1) return true
|
||||
return this.multipleSelection[0].bill_status !== '0'
|
||||
},
|
||||
statusTagType(status) {
|
||||
const map = { '0': 'warning', '1': 'primary', '2': 'success' }
|
||||
return map[String(status)] || ''
|
||||
},
|
||||
billStatusFormat(bill_status) {
|
||||
const map = {
|
||||
'0': '已创建',
|
||||
'1': '下发',
|
||||
'2': '完成',
|
||||
'3': '审核成功',
|
||||
'4': '审核失败'
|
||||
};
|
||||
return map[bill_status] || bill_status
|
||||
},
|
||||
auditStatusFormat(row) {
|
||||
const map = { '0': '未审核', '1': '已审核' }
|
||||
|
||||
Reference in New Issue
Block a user