feat(钢卷管理): 新增撤回发货功能并优化材质显示

在钢卷管理模块中新增撤回发货功能,允许用户撤回已发货的钢卷
同时优化外标签预览中材质的显示方式,增加厂家首字母信息
This commit is contained in:
砂糖
2026-01-11 19:04:25 +08:00
parent 9c180274af
commit f75794f3ff
3 changed files with 43 additions and 2 deletions

View File

@@ -183,4 +183,12 @@ export function listCoilWithIds(data) {
method: 'post',
data
})
}
// 撤回钢卷发货
export function cancelExportCoil(coilId) {
return request({
url: '/wms/materialCoil/withdrawExportCoil/' + coilId,
method: 'get'
})
}

View File

@@ -49,7 +49,7 @@
<!-- 第四行材质 + 表面质量 -->
<div class="info-grid-item label-cell">材质</div>
<div class="info-grid-item value-cell">
<input type="text" class="nob" :value="content.material || ''" />
<input type="text" class="nob" :value="materialWithManufacturer || ''" />
</div>
<div class="info-grid-item label-cell">质量要求</div>
<div class="info-grid-item value-cell">
@@ -158,6 +158,12 @@ export default {
default: 100
}
},
computed: {
// 材质展示信息,额外带上厂家的首字母
materialWithManufacturer() {
return this.content.material + ' - ' + this.content.manufacturer
}
},
data() {
return {
logo,

View File

@@ -135,6 +135,10 @@
@click="handleExportCoil(scope.row)">
发货
</el-button>
<el-button size="mini" v-if="showExportTime" type="text" icon="el-icon-close"
@click="handleCancelExport(scope.row)">
撤回发货
</el-button>
<el-button size="mini" v-if="showAbnormal" type="text" icon="el-icon-upload"
@click="handleAbnormal(scope.row)">查看异常</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)"
@@ -272,7 +276,15 @@
</template>
<script>
import { listMaterialCoil, getMaterialCoil, delMaterialCoil, addMaterialCoil, updateMaterialCoilSimple, getMaterialCoilTrace, exportCoil } from "@/api/wms/coil";
import {
listMaterialCoil,
getMaterialCoil,
delMaterialCoil,
addMaterialCoil,
updateMaterialCoilSimple,
getMaterialCoilTrace,
exportCoil,
cancelExportCoil } from "@/api/wms/coil";
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
import QRCode from "../../print/components/QRCode.vue";
import * as XLSX from 'xlsx'
@@ -768,6 +780,21 @@ export default {
}
});
},
handleCancelExport(row) {
// 将相关的action改为已取消然后将钢卷的已发货状态撤回
this.$modal.confirm('是否确认撤回钢卷编号为"' + row.currentCoilNo + '"的发货操作?').then(() => {
this.buttonLoading = true;
cancelExportCoil(row.coilId).then(response => {
this.$modal.msgSuccess("撤回发货成功");
this.getList();
}).catch(error => {
this.$modal.msgError("撤回发货失败");
}).finally(() => {
this.buttonLoading = false;
});
}).catch(() => {
});
},
/** 删除按钮操作 */
handleDelete(row) {
const coilIds = row.coilId || this.ids;