feat(wms): 新增导出功能并优化发货单显示
- 在base.vue中新增导出按钮和按库区排序选项 - 添加exportCoilWithAll API接口用于批量导出 - 在waybill.vue中新增showNewExport属性控制导出按钮显示 - 优化发货单页面显示,增加订单编号和备注显示 - 新增delivery/canuse页面用于展示可用钢卷 - 修复发货单修改时订单编号显示问题
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button icon="el-icon-download" size="mini" @click="handleNewExport" v-if="showNewExport">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -73,6 +74,9 @@
|
||||
<el-button type="info" plain icon="el-icon-printer" size="mini" :disabled="multiple"
|
||||
@click="handleBatchPrintLabel">批量打印标签</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-if="showOrderBy">
|
||||
<el-checkbox v-model="queryParams.orderBy" v-loading="loading" @change="getList" label="orderBy">按实际库区排序</el-checkbox>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
@@ -405,7 +409,8 @@ import {
|
||||
exportCoil,
|
||||
cancelExportCoil,
|
||||
checkCoilNo,
|
||||
returnCoil
|
||||
returnCoil,
|
||||
exportCoilWithAll
|
||||
} from "@/api/wms/coil";
|
||||
import { listBoundCoil } from "@/api/wms/deliveryWaybillDetail";
|
||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||
@@ -530,6 +535,14 @@ export default {
|
||||
showRelatedToOrder: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
showOrderBy: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
showNewExport: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -578,6 +591,7 @@ export default {
|
||||
itemIds: undefined,
|
||||
status: undefined,
|
||||
updateTime: undefined,
|
||||
orderBy: false,
|
||||
...this.querys,
|
||||
},
|
||||
// 表单参数
|
||||
@@ -917,12 +931,6 @@ export default {
|
||||
}
|
||||
},
|
||||
handleAbnormal(row) {
|
||||
// this.$router.push({
|
||||
// path: '/quality/detail',
|
||||
// query: {
|
||||
// coilId: row.coilId,
|
||||
// }
|
||||
// })
|
||||
this.currentCoilId = row.coilId;
|
||||
this.abnormalOpen = true;
|
||||
},
|
||||
@@ -1038,6 +1046,33 @@ export default {
|
||||
}).catch(error => {
|
||||
this.$modal.msgError("发货失败");
|
||||
});
|
||||
},
|
||||
async handleNewExport(row) {
|
||||
this.loading = true
|
||||
let coilIds = ''
|
||||
const query = {
|
||||
...this.queryParams,
|
||||
selectType: 'product',
|
||||
pageSize: 9999,
|
||||
pageNum: 1,
|
||||
}
|
||||
if (this.showWaybill) {
|
||||
const res = await listBoundCoil(query)
|
||||
coilIds = res.rows.map(item => item.coilId).join(',')
|
||||
this.loading = false
|
||||
this.download('wms/deliveryWaybill/export', {
|
||||
coilIds,
|
||||
}, 'coil.xlsx')
|
||||
} else {
|
||||
const { rows: coils } = await listMaterialCoil(query)
|
||||
coilIds = coils.map(item => item.coilId).join(',')
|
||||
this.loading = false
|
||||
this.download('wms/materialCoil/exportAll', {
|
||||
coilIds,
|
||||
}, 'coil.xlsx')
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
handleCheck(row) {
|
||||
this.isCheck = true;
|
||||
@@ -1172,7 +1207,6 @@ export default {
|
||||
...this.queryParams
|
||||
}, `materialCoil_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
/** 批量打印标签按钮 */
|
||||
handleBatchPrintLabel() {
|
||||
if (!this.ids || this.ids.length === 0) {
|
||||
|
||||
@@ -29,7 +29,8 @@ export default {
|
||||
showStatus: true,
|
||||
hideType: true,
|
||||
showLength: true,
|
||||
canExportAll: true
|
||||
canExportAll: true,
|
||||
showOrderBy: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<BasePage
|
||||
:qrcode="qrcode"
|
||||
:showWaybill="showWaybill"
|
||||
:showNewExport="showNewExport"
|
||||
:querys="querys" :labelType="labelType" :showStatus="showStatus" :hideType="hideType" :showControl="showControl" :showExportTime="showExportTime" />
|
||||
</template>
|
||||
|
||||
@@ -27,6 +28,7 @@ export default {
|
||||
hideType: false,
|
||||
showExportTime: false,
|
||||
showWaybill: true,
|
||||
showNewExport: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user