Commit 48b94a14 by wangzhihui

```

feat(delivery): 新增扫码配置查询和凭证下载功能

新增queryScanConfigByYq接口用于查询扫码配置,
新增downloadLabelCode接口用于下载凭证,
并根据scanEnable状态控制入库和下载凭证按钮的显示

fix(deliverAdd): 修复页面布局和数据绑定问题

修复发货详情页面的时间显示格式化问题,
优化图片预览组件的属性绑定,
修复库存数量显示逻辑,
调整表格组件的插槽属性绑定格式

refactor(DeliverList): 优化发货单列表页面结构

调整搜索表单和表格组件的属性绑定格式,
修复车辆类型展示的循环渲染问题,
优化签到对话框组件的事件绑定格式,
增加扫描配置查询功能
```
1 parent 68cbfb0e
...@@ -102,4 +102,29 @@ const getSignList = params => { ...@@ -102,4 +102,29 @@ const getSignList = params => {
}) })
} }
export default { getTypeList, getDeliveryList, addPurchaseOrder, exportExcel, getDeliveryDetail, deliverySignDetail, deliverySign, getSignList }
\ No newline at end of file \ No newline at end of file
// 下载凭证
const downloadLabelCode = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.labelCode.download'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const queryScanConfigByYq = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.scenemerchantref.queryScanConfigByYq'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { queryScanConfigByYq,getTypeList, getDeliveryList, addPurchaseOrder, exportExcel, getDeliveryDetail, deliverySignDetail, deliverySign, getSignList, downloadLabelCode }
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<template> <template>
<div class="purchase"> <div class="purchase">
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="2" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="2" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<h2>发货单列表</h2> <h2>发货单列表</h2>
<div> <div>
...@@ -11,16 +12,20 @@ ...@@ -11,16 +12,20 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="orderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="orderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<template slot="uploadFileUrl" slot-scope="scope"> <template slot="uploadFileUrl" slot-scope="scope">
<div v-if="scope.scope.uploadFileUrl"> <div v-if="scope.scope.uploadFileUrl">
<el-image :src="scope.scope.uploadFileUrl.split(',')[0]" fit="fill" :preview-src-list="scope.scope.uploadFileUrl.split(',')" style="width: 36px; height: 36px;"></el-image> <el-image :src="scope.scope.uploadFileUrl.split(',')[0]" fit="fill"
:preview-src-list="scope.scope.uploadFileUrl.split(',')" style="width: 36px; height: 36px;"></el-image>
</div> </div>
<div v-else>--</div> <div v-else>--</div>
</template> </template>
<template slot="putStatus" slot-scope="scope"> <template slot="putStatus" slot-scope="scope">
<div> <div>
<span :class="[scope.scope.putStatus == 1 ? 'ashSpot' : scope.scope.putStatus == 2 ? 'greenSpot' : 'yellowSpot']"></span> <span
:class="[scope.scope.putStatus == 1 ? 'ashSpot' : scope.scope.putStatus == 2 ? 'greenSpot' : 'yellowSpot']"></span>
<span>{{ scope.scope.putStatus | puStatus }}</span> <span>{{ scope.scope.putStatus | puStatus }}</span>
</div> </div>
</template> </template>
...@@ -28,7 +33,8 @@ ...@@ -28,7 +33,8 @@
<!-- <div>{{ JSON.stringify(scope.scope.suitCarTypeList) }}</div> --> <!-- <div>{{ JSON.stringify(scope.scope.suitCarTypeList) }}</div> -->
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top"> <el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content" style="max-height: 200px; overflow-y: scroll;"> <div slot="content" style="max-height: 200px; overflow-y: scroll;">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}</div> <div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}</div>
</div> </div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div> <div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip> </el-tooltip>
...@@ -42,7 +48,8 @@ ...@@ -42,7 +48,8 @@
</div> </div>
<deliver-add v-if="addVisible" :visible.sync="addVisible" :id="id" @handleSuccess="handleSearch"></deliver-add> <deliver-add v-if="addVisible" :visible.sync="addVisible" :id="id" @handleSuccess="handleSearch"></deliver-add>
<deliver-detail :visible.sync="detailVisible" :id="id"></deliver-detail> <deliver-detail :visible.sync="detailVisible" :id="id"></deliver-detail>
<sign-dialog v-if="signVisible" :visible.sync="signVisible" :info="signInfo" @handleClose="signVisibleChange" @handleConfirm="handleSignConfirm"></sign-dialog> <sign-dialog v-if="signVisible" :visible.sync="signVisible" :info="signInfo" @handleClose="signVisibleChange"
@handleConfirm="handleSignConfirm"></sign-dialog>
</div> </div>
</template> </template>
...@@ -54,6 +61,7 @@ import DeliverDetail from './deliverDetail' ...@@ -54,6 +61,7 @@ import DeliverDetail from './deliverDetail'
import SignDialog from './SignDialog' import SignDialog from './SignDialog'
import { membraneTypeList } from '@/utils/constants.js' import { membraneTypeList } from '@/utils/constants.js'
import { defaultStatusOptions, defaultDeliveryStatusOptions, defaultPutStatusOptions, purchaseTypeList, orderTypeOptions } from '@/utils/constants.js' import { defaultStatusOptions, defaultDeliveryStatusOptions, defaultPutStatusOptions, purchaseTypeList, orderTypeOptions } from '@/utils/constants.js'
// import { saveAs } from 'file-saver'
export default { export default {
name: 'PurchaseOrder', name: 'PurchaseOrder',
components: { components: {
...@@ -74,6 +82,7 @@ export default { ...@@ -74,6 +82,7 @@ export default {
}, },
data() { data() {
return { return {
scanEnable:0,
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
...@@ -198,7 +207,7 @@ export default { ...@@ -198,7 +207,7 @@ export default {
fn: '入库' fn: '入库'
}, },
condition: row => { condition: row => {
return row.putStatus == 1 || row.putStatus == 3 return this.scanEnable ==0&&(row.putStatus == 1 || row.putStatus == 3)
}, },
listeners: { listeners: {
click: this.handleWarehousing click: this.handleWarehousing
...@@ -218,6 +227,21 @@ export default { ...@@ -218,6 +227,21 @@ export default {
listeners: { listeners: {
click: this.handleSign click: this.handleSign
} }
},
{
type: 'GLButton',
name: '下载凭证',
attrs: {
type: 'text',
fn: '下载凭证'
},
condition: row => {
return this.scanEnable ==1
},
listeners: {
click: this.handleDownload
}
} }
], ],
// 表格 // 表格
...@@ -225,7 +249,7 @@ export default { ...@@ -225,7 +249,7 @@ export default {
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: { tableOption: {
width: '110px' width: '180'
}, },
tableColumns: [ tableColumns: [
{ {
...@@ -367,7 +391,9 @@ export default { ...@@ -367,7 +391,9 @@ export default {
} }
} }
}, },
created() {
this.queryScanConfigByYq()
},
mounted() { mounted() {
this.getOptionsList('showFormData') this.getOptionsList('showFormData')
this.getTypeList() this.getTypeList()
...@@ -379,6 +405,34 @@ export default { ...@@ -379,6 +405,34 @@ export default {
}, },
methods: { methods: {
queryScanConfigByYq() {
this.$apis.delivery.queryScanConfigByYq({ merchantId: this.$globalState?.session?.merchantId }).then(res => {
if(res.code == 0){
this.scanEnable = res.data.scanEnable
}
})
},
handleDownload(row) {
const params = {
upgradeGoodsId: row.upgradeGoodsId, // sku编码
businessCode: row.orderCode // 采购订单号
}
this.$apis.delivery.downloadLabelCode(params).then(res => {
if (res.code == 0) {
const downloadUrl = res.data
const link = document.createElement("a");
link.style.display = "none";
link.href = downloadUrl;
link.download = '';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
} else {
this.$message.error(res.message)
}
})
},
getTypeList() { getTypeList() {
this.$apis.delivery.getTypeList({}).then(res => { this.$apis.delivery.getTypeList({}).then(res => {
this.baseData.goodsTypeOptions = res this.baseData.goodsTypeOptions = res
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!