Commit b5389786 by wangzhihui

```

refactor(stockManage): 移除多余的空行

移除 stockManage.js 文件中多个函数定义之间的多余空行,
包括 batchDelicery、deliveryReject、getTransferGoodsInfo
和 getTransferAuitInfo 函数。

feat(stock): 优化补库存标签码功能

- 修改 labelCodeRecode 接口调用参数格式
- 添加接口响应结果验证逻辑
- 修复文件下载链接处理方式

style(outbound): 优化表格列配置格式化

调整出库页面表格列配置的代码格式,统一引号使用和
条件判断逻辑简化。

refactor(warehousing): 整理代码格式

整理 warehousing 页面的模板代码格式,合并多行属性
为单行,提高代码可读性。

fix(stock): 隐藏扫描启用状态下的补码和日志按钮

当商品的 canScanEnable 为 true 时,隐藏补码和日志操作按钮。

style(stock): 调整表格列宽度配置

调整库存页面表格列的宽度设置,优化界面显示效果。

chore(stock): 移除调试日志

移除库存统计接口响应的调试打印语句。
```
1 parent d881f15d
...@@ -495,7 +495,6 @@ const getTransferShipmentList = params => { ...@@ -495,7 +495,6 @@ const getTransferShipmentList = params => {
}) })
} }
// 调拨发货 批量发货 // 调拨发货 批量发货
const batchDelicery = params => { const batchDelicery = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
...@@ -508,7 +507,6 @@ const batchDelicery = params => { ...@@ -508,7 +507,6 @@ const batchDelicery = params => {
}) })
} }
// 调拨发货驳回 // 调拨发货驳回
const deliveryReject = params => { const deliveryReject = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
...@@ -521,7 +519,6 @@ const deliveryReject = params => { ...@@ -521,7 +519,6 @@ const deliveryReject = params => {
}) })
} }
// 获取查看调拨详情商品信息 // 获取查看调拨详情商品信息
const getTransferGoodsInfo = params => { const getTransferGoodsInfo = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
...@@ -534,7 +531,6 @@ const getTransferGoodsInfo = params => { ...@@ -534,7 +531,6 @@ const getTransferGoodsInfo = params => {
}) })
} }
// 获取查看调拨详情审批记录信息 // 获取查看调拨详情审批记录信息
const getTransferAuitInfo = params => { const getTransferAuitInfo = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
...@@ -555,7 +551,8 @@ const labelCodeRecode = params => { ...@@ -555,7 +551,8 @@ const labelCodeRecode = params => {
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true,
returnAll: true
}) })
} }
......
...@@ -283,17 +283,17 @@ export default { ...@@ -283,17 +283,17 @@ export default {
} }
}, },
{ {
label: "出库方式", label: '出库方式',
prop: "reduceMethod", prop: 'reduceMethod',
width: "200px", width: '200px',
formatter: (cellValue) => { formatter: cellValue => {
// 出库方式: 2-扫码出库, 4-手工出库 // 出库方式: 2-扫码出库, 4-手工出库
return cellValue.reduceMethod == 2 ? "扫码出库" : cellValue.reduceMethod == 4 ? "手工出库" : "-"; return cellValue.reduceMethod == 2 ? '扫码出库' : cellValue.reduceMethod == 4 ? '手工出库' : '-'
}
}, },
}, { {
label: "备注", label: '备注',
prop: " remark", prop: ' remark'
width: "200px",
}, },
{ {
label: '支付时间', label: '支付时间',
......
<!-- 补库存标签码弹窗 --> <!-- 补库存标签码弹窗 -->
<template> <template>
<GLDialog title="补库存标签码" :visible.sync="dialogVisible" class="complementCodeDialog" width="500px" mode="mid" <GLDialog title="补库存标签码" :visible.sync="dialogVisible" class="complementCodeDialog" width="500px" mode="mid" :destroy-on-close="true" :close-on-click-modal="false" okText="下载" cancelText="取消" @onOk="handleConfirm" @onCancel="handleClose" :before-close="handleClose">
:destroy-on-close="true" :close-on-click-modal="false" okText="下载" cancelText="取消" @onOk="handleConfirm"
@onCancel="handleClose" :before-close="handleClose">
<div v-loading="isLoading" class="complement-dialog-content"> <div v-loading="isLoading" class="complement-dialog-content">
<el-form ref="form" label-width="120px" :model="form" :rules="rules"> <el-form ref="form" label-width="120px" :model="form" :rules="rules">
<el-form-item label="产品名称:"> <el-form-item label="产品名称:">
...@@ -111,16 +109,18 @@ export default { ...@@ -111,16 +109,18 @@ export default {
this.isLoading = true this.isLoading = true
this.$apis.stockManage this.$apis.stockManage
.labelCodeRecode(params) .labelCodeRecode({ dataString: JSON.stringify(params) })
.then(res => { .then(res => {
this.isLoading = false this.isLoading = false
const url = (res && res.labelImageUrl) || (typeof res === 'string' ? res : '') if (res && res.code == 0) {
const url = res && res.labelImageUrl
if (url) { if (url) {
this.downloadFile(url, `补码标签_${this.row.upgradeGoodsName || this.row.productCode}.png`) this.downloadFile(url)
this.dialogVisible = false this.dialogVisible = false
this.$message.success('补库存标签码成功并开始下载') this.$message.success('补库存标签码成功并开始下载')
}
} else { } else {
this.$message.error('未获取到标签码下载链接') this.$message.error('补库存标签码失败')
} }
}) })
.catch(() => { .catch(() => {
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
downloadFile(url, fileName) { downloadFile(url, fileName) {
const link = document.createElement('a') const link = document.createElement('a')
link.style.display = 'none' link.style.display = 'none'
link.href = url + '?response-content-type=application/octet-stream' link.href = url
link.download = fileName link.download = fileName
document.body.appendChild(link) document.body.appendChild(link)
link.click() link.click()
......
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset">
<template #queryDateHtml> <template #queryDateHtml>
<el-date-picker v-model="searchForm.selectData" type="daterange" range-separator="至" <el-date-picker v-model="searchForm.selectData" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="stockQueryDatePickerOptions"></el-date-picker>
start-placeholder="开始日期"
end-placeholder="结束日期" :picker-options="stockQueryDatePickerOptions"></el-date-picker>
</template> </template>
</GLCombiForm> </GLCombiForm>
<div class="table-header"> <div class="table-header">
...@@ -24,8 +22,10 @@ ...@@ -24,8 +22,10 @@
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleInventoryDetails(scope.scope)">库存明细</el-button> <el-button type="text" @click="handleInventoryDetails(scope.scope)">库存明细</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">统计</el-button> <el-button type="text" @click="handleDetail(scope.scope)">统计</el-button>
<template v-if="!scope.scope.canScanEnable">
<el-button type="text" @click="handleComplement(scope.scope)">补码</el-button> <el-button type="text" @click="handleComplement(scope.scope)">补码</el-button>
<el-button type="text" @click="handleLog(scope.scope)">日志</el-button> <el-button type="text" @click="handleLog(scope.scope)">日志</el-button>
</template>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: { tableOption: {
width:240 width: 240
}, },
tableColumns: [ tableColumns: [
{ {
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
{ {
label: '规格', label: '规格',
prop: 'specificationData', prop: 'specificationData',
width: 180, width: 150,
line: 1 line: 1
}, },
{ {
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
{ {
label: '产品ID', label: '产品ID',
prop: 'upgradeCommodityCode', prop: 'upgradeCommodityCode',
width: 180, width: 320,
line: 1 line: 1
}, },
{ {
...@@ -253,7 +253,6 @@ export default { ...@@ -253,7 +253,6 @@ export default {
var params = this.$common.utils.deepClone(this.searchForm) var params = this.$common.utils.deepClone(this.searchForm)
params.dataMonth = dayjs(new Date()).format('YYYY-MM') params.dataMonth = dayjs(new Date()).format('YYYY-MM')
this.$apis.stockManage.getMerchantGoodsStockMonthCount(params).then(res => { this.$apis.stockManage.getMerchantGoodsStockMonthCount(params).then(res => {
console.log(res, '???....')
this.totalInventory = res this.totalInventory = res
}) })
}, },
......
<template> <template>
<div class="purchase"> <div class="purchase">
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<div> <div>
<div> <div>
...@@ -16,19 +11,11 @@ ...@@ -16,19 +11,11 @@
<span class="txt-blue">¥{{ totalObj.totalIncreaseStockMoney || '0' }}</span> <span class="txt-blue">¥{{ totalObj.totalIncreaseStockMoney || '0' }}</span>
</div> </div>
</div> </div>
<el-button size="small" <el-button size="small" @click="exportExcel">导出</el-button>
@click="exportExcel">导出</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="warehousingRef" <GLTable ref="warehousingRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
...@@ -267,14 +254,13 @@ export default { ...@@ -267,14 +254,13 @@ export default {
width: 200 width: 200
}, },
{ {
label: "入库方式", label: '入库方式',
prop: "warehousingMethod", prop: 'warehousingMethod',
width: "200px", width: '200px',
formatter: (cellValue) => { formatter: cellValue => {
// 入库方式: 1-扫码入库, 3-手工入库 // 入库方式: 1-扫码入库, 3-手工入库
return cellValue.warehousingMethod == 1 ? "扫码入库" : "手工入库"; return cellValue.warehousingMethod == 1 ? '扫码入库' : cellValue.warehousingMethod == 3 ? '手工入库' : '-'
}, }
} }
] ]
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!