Commit 243b260b by 张立顺

feat 采购商城功能开发

1 parent 23472bd4
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
"eslint": "^5.16.0", "eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1", "eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0", "eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.14.1", "node-sass": "npm:dart-sass@^1.25.0",
"prettier": "^1.19.1", "prettier": "^1.19.1",
"sass-loader": "^8.0.0", "sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1", "vue-cli-plugin-element": "^1.0.1",
......
...@@ -246,5 +246,54 @@ export function getByIdWithSpecification(params) { ...@@ -246,5 +246,54 @@ export function getByIdWithSpecification(params) {
returnAll: true returnAll: true
}) })
} }
// 采购退货
export function purchaseOrderGoodsRefund(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smarcarlife.purchaseOrder.goodsRefund`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取车型
export function getCarBrandList(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.car.getCarBrandList`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取车型
export function carTypePage(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smartcarlife.common.car.type.page`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取sku可选车品牌列表
export function getCanSelectCarBrandList(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smartcarlife.upgradeGoods.getCanSelectCarBrandList`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { checkShipper, get4SRefByYqShopList, selectByOrderCode, purchaseOrderDelete, getManageMode, getMerchantList, purchaseOrderPutIn, exportExcel, shoppingCarUpdateNumber, purchaseOrderAdd, shoppingCarAdd, shoppingCarRemove, updateSelectedFlag, listGroupByGoodsType, getPurchaseOrderList, purchaseOrderCancelOrCheck, purchaseOrderDetail, listWithPagePurchaseInfo, addressGet, addressSave, getByIdWithSpecification } export default { getCanSelectCarBrandList, carTypePage, getCarBrandList, purchaseOrderGoodsRefund, checkShipper, get4SRefByYqShopList, selectByOrderCode, purchaseOrderDelete, getManageMode, getMerchantList, purchaseOrderPutIn, exportExcel, shoppingCarUpdateNumber, purchaseOrderAdd, shoppingCarAdd, shoppingCarRemove, updateSelectedFlag, listGroupByGoodsType, getPurchaseOrderList, purchaseOrderCancelOrCheck, purchaseOrderDetail, listWithPagePurchaseInfo, addressGet, addressSave, getByIdWithSpecification }
...@@ -24,25 +24,33 @@ ...@@ -24,25 +24,33 @@
</div> </div>
<div> <div>
发货数量: 发货数量:
<span>{{ membraneTypeList.includes(item.goodsType) ? `${item.purchaseNumber}卷` : `${item.purchaseNumber}件` }}</span> <span>{{ membraneTypeList.includes(item.goodsType) ? `${item.purchaseNumber}卷` : `${item.purchaseNumber}件`
<span class="lookNumber" @click="lookNumber(item.deliveryCardList)" v-if="item.deliveryCardList && item.deliveryCardList.length > 0">查看卡号</span> }}</span>
<span class="lookNumber" @click="lookNumber(item.deliveryCardList)"
v-if="item.deliveryCardList && item.deliveryCardList.length > 0">查看卡号</span>
</div> </div>
<div> <div>
可用库存数量: 可用库存数量:
<span>{{ item.stockNum }}{{ membraneTypeList.includes(item.goodsType) ? `米` : `件` }}</span> <span>{{ item.stockNum }}{{ membraneTypeList.includes(item.goodsType) ? `米` : `件` }}</span>
</div> </div>
<div class="add-btn" @click="addLineTable(index)" v-if="item.deliveryCardList === null || item.deliveryCardList.length == 0">添加入库记录</div> <div class="add-btn" @click="addLineTable(index)"
v-if="item.deliveryCardList === null || item.deliveryCardList.length == 0">添加入库记录</div>
</div> </div>
<el-form ref="addForm" :model="item" size="small" :rules="rules" v-if="item.deliveryCardList === null || item.deliveryCardList.length == 0"> <el-form ref="addForm" :model="item" size="small" :rules="rules"
<GLTable :tableData="item.goodsWarehousingList" :noDataImg="url" :tableParams="tableParams" :hasPage="false"> v-if="item.deliveryCardList === null || item.deliveryCardList.length == 0">
<GLTable :tableData="item.goodsWarehousingList" :noDataImg="url" :tableParams="tableParams"
:hasPage="false">
<template slot="increaseStockNum" slot-scope="scope"> <template slot="increaseStockNum" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'goodsWarehousingList.' + scope.index + '.increaseStockNum'" :rules="rules.increaseStockNum"> <el-form-item style="margin-bottom: 0px"
<el-input v-model="scope.scope.increaseStockNum" placeholder="请输入" @blur="handleCalculate(scope.scope, 'increaseStockNum', index)"></el-input> :prop="'goodsWarehousingList.' + scope.index + '.increaseStockNum'" :rules="rules.increaseStockNum">
<el-input v-model="scope.scope.increaseStockNum" placeholder="请输入"
@blur="handleCalculate(scope.scope, 'increaseStockNum', index)"></el-input>
</el-form-item> </el-form-item>
</template> </template>
<template slot="film" slot-scope="scope"> <template slot="film" slot-scope="scope">
<div v-if="manageMode && filmTypeList.includes(detailInfo.goodsType)"> <div v-if="manageMode && filmTypeList.includes(detailInfo.goodsType)">
<el-button v-if="!scope.scope.filmRollList" type="text" @click="handleSelectFilm(scope.scope, index, scope.index)">请选择</el-button> <el-button v-if="!scope.scope.filmRollList" type="text"
@click="handleSelectFilm(scope.scope, index, scope.index)">请选择</el-button>
<div v-else> <div v-else>
<span class="film-txt">...({{ scope.scope.filmRollList.length }})</span> <span class="film-txt">...({{ scope.scope.filmRollList.length }})</span>
<el-button type="text" @click="handleSelectFilm(scope.scope, index, scope.index)">重新选择</el-button> <el-button type="text" @click="handleSelectFilm(scope.scope, index, scope.index)">重新选择</el-button>
...@@ -52,17 +60,23 @@ ...@@ -52,17 +60,23 @@
</template> </template>
<!-- 入库仓库 --> <!-- 入库仓库 -->
<template slot="yqMerchantId" slot-scope="scope"> <template slot="yqMerchantId" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'goodsWarehousingList.' + scope.index + '.yqMerchantId'" :rules="rules.shopMerchantName"> <el-form-item style="margin-bottom: 0px" :prop="'goodsWarehousingList.' + scope.index + '.yqMerchantId'"
<el-select style="width: 100%" v-model="scope.scope.yqMerchantId" placeholder="请选择" @change="handleSelect(scope.scope, scope.scope.yqMerchantId)"> :rules="rules.shopMerchantName">
<el-option v-for="item in storeUsageList" :key="item.merchantNo" :label="item.merchantName" :value="item.merchantNo"></el-option> <el-select style="width: 100%" v-model="scope.scope.yqMerchantId" placeholder="请选择"
@change="handleSelect(scope.scope, scope.scope.yqMerchantId)">
<el-option v-for="item in storeUsageList" :key="item.merchantNo" :label="item.merchantName"
:value="item.merchantNo"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
<!-- 入库门店 --> <!-- 入库门店 -->
<template slot="merchantId" slot-scope="scope"> <template slot="merchantId" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'goodsWarehousingList.' + scope.index + '.merchantId'" :rules="rules.merchantId"> <el-form-item style="margin-bottom: 0px" :prop="'goodsWarehousingList.' + scope.index + '.merchantId'"
<el-select style="width: 100%" v-model="scope.scope.merchantId" placeholder="请选择" @change="handleStoreSelect(scope.scope, scope.scope.merchantId)"> :rules="rules.merchantId">
<el-option v-for="item in refByYqShopList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId"></el-option> <el-select style="width: 100%" v-model="scope.scope.merchantId" placeholder="请选择"
@change="handleStoreSelect(scope.scope, scope.scope.merchantId)">
<el-option v-for="item in refByYqShopList" :key="item.merchantId" :label="item.merchantName"
:value="item.merchantId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
...@@ -75,14 +89,17 @@ ...@@ -75,14 +89,17 @@
</div> </div>
</template> </template>
<el-dialog width="750px" title="查看发货卡号" :visible.sync="innerVisible" append-to-body> <el-dialog width="750px" title="查看发货卡号" :visible.sync="innerVisible" append-to-body>
<GLTable class="look-card-wrap" :tableData="tableData" :noDataImg="url" :tableParams="innerParams" :hasPage="false"></GLTable> <GLTable class="look-card-wrap" :tableData="tableData" :noDataImg="url" :tableParams="innerParams"
:hasPage="false">
</GLTable>
</el-dialog> </el-dialog>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogShow = false">关闭</el-button> <el-button size="small" @click="dialogShow = false">关闭</el-button>
<el-button type="primary" size="small" @click="handleSave" :loading="loading">保存入库</el-button> <el-button type="primary" size="small" @click="handleSave" :loading="loading">保存入库</el-button>
</span> </span>
</GLDialog> </GLDialog>
<filmDialog :visible.sync="filmVisible" :info="info" maxAddNumAttr="stockAddNum" @handleConfirm="handleFilmConfirm"></filmDialog> <filmDialog :visible.sync="filmVisible" :info="info" maxAddNumAttr="stockAddNum" @handleConfirm="handleFilmConfirm">
</filmDialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -422,44 +439,53 @@ export default { ...@@ -422,44 +439,53 @@ export default {
color: #666666ff; color: #666666ff;
font-size: 14px; font-size: 14px;
margin-bottom: 16px; margin-bottom: 16px;
span { span {
color: #333333ff; color: #333333ff;
} }
.add-btn { .add-btn {
font-size: 14px; font-size: 14px;
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
} }
} }
.table-wrap { .table-wrap {
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
padding: 16px; padding: 16px;
box-sizing: border-box; box-sizing: border-box;
margin-top: 16px; margin-top: 16px;
/deep/ .el-form-item__error {
::v-deep .el-form-item__error {
padding-top: 2px; padding-top: 2px;
z-index: 9999999; z-index: 9999999;
position: static; position: static;
} }
/deep/ td.el-table__cell {
::v-deep td.el-table__cell {
height: 64px; height: 64px;
} }
} }
.lookNumber { .lookNumber {
font-size: 14px; font-size: 14px;
color: #5850ff !important; color: #5850ff !important;
cursor: pointer; cursor: pointer;
margin-left: 8px; margin-left: 8px;
} }
.look-card-wrap { .look-card-wrap {
/deep/.el-table th.el-table__cell > .cell { ::v-deep.el-table th.el-table__cell>.cell {
padding: 0 16px; padding: 0 16px;
text-align: center; text-align: center;
} }
/deep/.el-table__body td.el-table__cell {
::v-deep.el-table__body td.el-table__cell {
text-align: center; text-align: center;
} }
} }
.film-txt { .film-txt {
box-sizing: border-box; box-sizing: border-box;
height: 32px; height: 32px;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="detail-info"> <div class="detail-info">
<div> <div>
商品名称: 商品名称:
<span>{{ detailInfo.upgradeGoodsName }}&nbsp;&nbsp; {{detailInfo.specificationData}}</span> <span>{{ detailInfo.upgradeGoodsName }}&nbsp;&nbsp; {{ detailInfo.specificationData }}</span>
</div> </div>
<div> <div>
发货数量: 发货数量:
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
</div> </div>
<!-- </template> --> <!-- </template> -->
<el-dialog width="750px" title="查看发货卡号" :visible.sync="innerVisible" append-to-body> <el-dialog width="750px" title="查看发货卡号" :visible.sync="innerVisible" append-to-body>
<GLTable class="look-card-wrap" :tableData="tableData" :noDataImg="url" :tableParams="innerParams" :hasPage="false"> <GLTable class="look-card-wrap" :tableData="tableData" :noDataImg="url" :tableParams="innerParams"
:hasPage="false">
</GLTable> </GLTable>
</el-dialog> </el-dialog>
</GLDialog> </GLDialog>
...@@ -182,7 +183,7 @@ export default { ...@@ -182,7 +183,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
margin-top: 16px; margin-top: 16px;
/deep/ .el-form-item__error { ::v-deep .el-form-item__error {
padding-top: 2px; padding-top: 2px;
z-index: 9999999; z-index: 9999999;
position: static; position: static;
...@@ -201,12 +202,13 @@ export default { ...@@ -201,12 +202,13 @@ export default {
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
/deep/.el-table th.el-table__cell>.cell { ::v-deep.el-table th.el-table__cell>.cell {
padding: 0 16px; padding: 0 16px;
text-align: center; text-align: center;
} }
/deep/.el-table__body td.el-table__cell { ::v-deep.el-table__body td.el-table__cell {
text-align: center; text-align: center;
} }
}</style> }
</style>
...@@ -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,13 +12,26 @@ ...@@ -11,13 +12,26 @@
</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="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>
<template slot="carName" slot-scope="scope">
<!-- <div>{{ JSON.stringify(scope.scope.suitCarTypeList) }}</div> -->
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ item.carTypeName }}</div>
</div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip>
<div v-else>--</div>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
...@@ -42,6 +56,15 @@ export default { ...@@ -42,6 +56,15 @@ export default {
DeliverAdd, DeliverAdd,
DeliverDetail DeliverDetail
}, },
filters: {
formatCar(list) {
console.log(list, 'list')
let str = list.map(item => {
return item.carTypeName
}).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
data() { data() {
return { return {
size: 'small', size: 'small',
...@@ -185,6 +208,11 @@ export default { ...@@ -185,6 +208,11 @@ export default {
width: 100 width: 100
}, },
{ {
label: '适用车型',
addHtml: 'carName',
width: 200,
},
{
label: '系列', label: '系列',
prop: 'goodsName' prop: 'goodsName'
}, },
...@@ -237,7 +265,11 @@ export default { ...@@ -237,7 +265,11 @@ export default {
label: '所属商户', label: '所属商户',
prop: 'merchantName' prop: 'merchantName'
}, },
{
label: '备注',
prop: 'remark',
width: 150
},
{ {
label: '状态', label: '状态',
prop: 'putStatus', prop: 'putStatus',
...@@ -385,6 +417,7 @@ export default { ...@@ -385,6 +417,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/mixin.scss'; @import '@/assets/css/mixin.scss';
.purchase { .purchase {
.table-header { .table-header {
display: flex; display: flex;
...@@ -392,33 +425,40 @@ export default { ...@@ -392,33 +425,40 @@ export default {
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 20px; margin-top: 20px;
h2 { h2 {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
} }
.glbtn { .glbtn {
left: 46px; left: 46px;
position: absolute; position: absolute;
} }
.btn { .btn {
right: 47px; right: 47px;
position: absolute; position: absolute;
} }
} }
.greenSpot { .greenSpot {
@include dot; @include dot;
background: $color-green; background: $color-green;
} }
.yellowSpot { .yellowSpot {
@include dot; @include dot;
background: $color-yellow; background: $color-yellow;
} }
.ashSpot { .ashSpot {
@include dot; @include dot;
background: $color-gray; background: $color-gray;
} }
.table-btns /deep/.el-button--text {
.table-btns ::v-deep.el-button--text {
min-width: 0 !important; min-width: 0 !important;
padding: 0; padding: 0;
} }
......
...@@ -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,10 +12,12 @@ ...@@ -11,10 +12,12 @@
</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="status" slot-scope="scope"> <template slot="status" slot-scope="scope">
<div> <div>
<span :class="Spot[scope.scope.status-1]"></span> <span :class="Spot[scope.scope.status - 1]"></span>
<span>{{ scope.scope.status | purchaseCheckStatus }}</span> <span>{{ scope.scope.status | purchaseCheckStatus }}</span>
</div> </div>
</template> </template>
...@@ -25,7 +28,9 @@ ...@@ -25,7 +28,9 @@
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<filmDialog :visible.sync="filmVisible" :info="info" @handleConfirm="handleFilmConfirm"></filmDialog> <filmDialog :visible.sync="filmVisible" :info="info" @handleConfirm="handleFilmConfirm"></filmDialog>
<rejectDialog v-if="rejectDialogVisible" :visible.sync="rejectDialogVisible" @handleRejectConfirm="handleRejectConfirm"></rejectDialog> <rejectDialog v-if="rejectDialogVisible" :visible.sync="rejectDialogVisible"
@handleRejectConfirm="handleRejectConfirm">
</rejectDialog>
</div> </div>
</template> </template>
...@@ -463,6 +468,7 @@ export default { ...@@ -463,6 +468,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/mixin.scss'; @import '@/assets/css/mixin.scss';
.purchase { .purchase {
.table-header { .table-header {
display: flex; display: flex;
...@@ -470,37 +476,45 @@ export default { ...@@ -470,37 +476,45 @@ export default {
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 20px; margin-top: 20px;
h2 { h2 {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
} }
.glbtn { .glbtn {
left: 46px; left: 46px;
position: absolute; position: absolute;
} }
.btn { .btn {
right: 47px; right: 47px;
position: absolute; position: absolute;
} }
} }
.greenSpot { .greenSpot {
@include dot; @include dot;
background: $color-green; background: $color-green;
} }
.yellowSpot { .yellowSpot {
@include dot; @include dot;
background: $color-yellow; background: $color-yellow;
} }
.ashSpot { .ashSpot {
@include dot; @include dot;
background: $color-gray; background: $color-gray;
} }
.redSpot { .redSpot {
@include dot; @include dot;
background: $color-red; background: $color-red;
} }
.table-btns /deep/.el-button--text {
.table-btns ::v-deep.el-button--text {
min-width: 0 !important; min-width: 0 !important;
padding: 0; padding: 0;
} }
......
<!-- 驳回弹窗 --> <!-- 驳回弹窗 -->
<template> <template>
<GLDialog title="驳回" :visible.sync="dialogVisible" class="rejectDialog" :destroy-on-close="true" :close-on-click-modal="false" :before-close="handleClose" @onOk="handleConfirm" @onCancel="handleClose"> <GLDialog title="驳回" :visible.sync="dialogVisible" class="rejectDialog" :destroy-on-close="true"
:close-on-click-modal="false" :before-close="handleClose" @onOk="handleConfirm" @onCancel="handleClose">
<el-form ref="rejectForm" class="rejectForm" :model="dataForm" :rules="formRules" label-width="154px" size="small"> <el-form ref="rejectForm" class="rejectForm" :model="dataForm" :rules="formRules" label-width="154px" size="small">
<el-form-item label="驳回原因:" prop="reason"> <el-form-item label="驳回原因:" prop="reason">
<el-input v-model.trim="dataForm.reason" placeholder="请输入驳回原因" maxlength="20" class="form-node"></el-input> <el-input v-model.trim="dataForm.reason" placeholder="请输入驳回原因" maxlength="20" class="form-node"></el-input>
...@@ -21,7 +22,7 @@ export default { ...@@ -21,7 +22,7 @@ export default {
}, },
recordInfo: { recordInfo: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
data() { data() {
...@@ -67,12 +68,12 @@ export default { ...@@ -67,12 +68,12 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.rejectDialog {
.rejectDialog{ .form-node {
.form-node{
width: 432px; width: 432px;
} }
/deep/.el-dialog__body{
::v-deep.el-dialog__body {
display: flex; display: flex;
align-items: center; align-items: center;
} }
......
...@@ -3,23 +3,14 @@ ...@@ -3,23 +3,14 @@
<div class="edit-purchase-grounding purchase-grounding edit-box"> <div class="edit-purchase-grounding purchase-grounding edit-box">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">基础信息</p> <p class="edit-title">基础信息</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :pageThat="this" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :pageThat="this"
:labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm"
:formData="editFormData" :formRules="editRule">
<div slot="selectGoods"> <div slot="selectGoods">
<el-select <el-select v-model="editForm.upgradeGoodsId" placeholder="请选择上架商品" @change="handleGoodsChange"
v-model="editForm.upgradeGoodsId" style="width: 432px" @focus="handleGoodsFocus" remote reserve-keyword @visible-change="visibleChange"
placeholder="请选择上架商品" :remote-method="remoteMethod" v-el-select-loadmore="interestsLoadmore" filterable>
@change="handleGoodsChange" <el-option v-for="subItem in goodsList" :key="subItem.id" :label="subItem.upgradeGoodsName"
style="width: 432px"
@focus="handleGoodsFocus"
remote
reserve-keyword
@visible-change="visibleChange"
:remote-method="remoteMethod"
v-el-select-loadmore="interestsLoadmore"
filterable>
<el-option v-for="subItem in goodsList"
:key="subItem.id"
:label="subItem.upgradeGoodsName"
:value="subItem.id"> :value="subItem.id">
</el-option> </el-option>
</el-select> </el-select>
...@@ -28,7 +19,8 @@ ...@@ -28,7 +19,8 @@
<div class="goodsInfo-box"> <div class="goodsInfo-box">
<div class="item" v-for="(subItem, subIndex) in copyGoodsDetailForm" :key="subIndex"> <div class="item" v-for="(subItem, subIndex) in copyGoodsDetailForm" :key="subIndex">
<div v-if="subItem.addHtml" class="item_box"> <div v-if="subItem.addHtml" class="item_box">
<div class="label">{{ (membraneTypeList.includes(selectedGoodsInfo['goodsType']) ? subItem.label + `(元)/卷` : (subItem.label + '(元)/件')) }}:</div> <div class="label">{{ (membraneTypeList.includes(selectedGoodsInfo['goodsType']) ? subItem.label +
`(元)/卷` : (subItem.label + '(元)/件')) }}:</div>
<div class="value">{{ priceFilter(selectedGoodsInfo[subItem.value]) }}</div> <div class="value">{{ priceFilter(selectedGoodsInfo[subItem.value]) }}</div>
</div> </div>
<div v-else class="item_box"> <div v-else class="item_box">
...@@ -42,7 +34,9 @@ ...@@ -42,7 +34,9 @@
</div> </div>
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">上架门店</p> <p class="edit-title">上架门店</p>
<glsx-combi-form class="edit-form-container" ref="editFormMerchantRef" :isEdit="isEdit" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="merchantEditFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormMerchantRef" :isEdit="isEdit"
:labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm"
:formData="merchantEditFormData" :formRules="editRule">
<div slot="merchantTable" :style="{ width: `calc(100% - ${defaultLabelWidth} )` }"> <div slot="merchantTable" :style="{ width: `calc(100% - ${defaultLabelWidth} )` }">
<div class="table-title"> <div class="table-title">
上架门店列表 上架门店列表
...@@ -59,15 +53,19 @@ ...@@ -59,15 +53,19 @@
<GLFooter> <GLFooter>
<el-button @click="handleCancel" size="medium">取消</el-button> <el-button @click="handleCancel" size="medium">取消</el-button>
<!-- 新增/草稿显示 --> <!-- 新增/草稿显示 -->
<el-button v-if="editType == 'add' || editForm.status == 0" type="primary" @click="handleConfirm(true)" plain size="medium" :loading="loading">草稿</el-button> <el-button v-if="editType == 'add' || editForm.status == 0" type="primary" @click="handleConfirm(true)" plain
size="medium" :loading="loading">草稿</el-button>
<el-button type="primary" @click="handleConfirm(false)" size="medium" :loading="loading">保存上架</el-button> <el-button type="primary" @click="handleConfirm(false)" size="medium" :loading="loading">保存上架</el-button>
</GLFooter> </GLFooter>
<!-- 门店弹窗 --> <!-- 门店弹窗 -->
<relate-store-dialog v-if="relateStoreVisible" ref="relateStore" :relateStoreVisible="relateStoreVisible" :storeApi="storeApi" :storeSearchForm="storeSearchForm" :storeSelected="selectedList" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose"> <relate-store-dialog v-if="relateStoreVisible" ref="relateStore" :relateStoreVisible="relateStoreVisible"
:storeApi="storeApi" :storeSearchForm="storeSearchForm" :storeSelected="selectedList"
@handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose">
<el-row slot> <el-row slot>
<el-form :model="storeSearchForm" ref="relate" :inline="true" label-width="90px"> <el-form :model="storeSearchForm" ref="relate" :inline="true" label-width="90px">
<el-form-item label="客户名称:" prop="merchantName"> <el-form-item label="客户名称:" prop="merchantName">
<el-input :size="size" v-model.trim="storeSearchForm.merchantName" placeholder="请输入客户名称" clearable></el-input> <el-input :size="size" v-model.trim="storeSearchForm.merchantName" placeholder="请输入客户名称"
clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商户号:" prop="merchantName"> <el-form-item label="商户号:" prop="merchantName">
<el-input :size="size" v-model.trim="storeSearchForm.merchantId" placeholder="请输入商户号" clearable></el-input> <el-input :size="size" v-model.trim="storeSearchForm.merchantId" placeholder="请输入商户号" clearable></el-input>
...@@ -258,7 +256,7 @@ export default { ...@@ -258,7 +256,7 @@ export default {
directives: { directives: {
'el-select-loadmore': { 'el-select-loadmore': {
bind (el, binding) { bind(el, binding) {
const SELECTWRAP_DOM = el.querySelector( const SELECTWRAP_DOM = el.querySelector(
'.el-select-dropdown .el-select-dropdown__wrap' '.el-select-dropdown .el-select-dropdown__wrap'
) )
...@@ -281,7 +279,7 @@ export default { ...@@ -281,7 +279,7 @@ export default {
methods: { methods: {
keyDown() { keyDown() {
document.onkeydown = function() { document.onkeydown = function () {
var evt = window.event || arguments[0] var evt = window.event || arguments[0]
if (evt && evt.keyCode == 13) { if (evt && evt.keyCode == 13) {
if (typeof evt.cancelBubble != 'undefined') evt.cancelBubble = true if (typeof evt.cancelBubble != 'undefined') evt.cancelBubble = true
...@@ -294,9 +292,9 @@ export default { ...@@ -294,9 +292,9 @@ export default {
setUnit() { setUnit() {
let index = this.editFormData.findIndex(val => val.name == 'shopPurchasePrice') let index = this.editFormData.findIndex(val => val.name == 'shopPurchasePrice')
if (this.membraneTypeList.includes(this.selectedGoodsInfo?.goodsType)) { // 所选商品是膜类 门店采购价单位修改 if (this.membraneTypeList.includes(this.selectedGoodsInfo?.goodsType)) { // 所选商品是膜类 门店采购价单位修改
if(index > -1) this.editFormData[index].label = '门店采购价(元)/卷' if (index > -1) this.editFormData[index].label = '门店采购价(元)/卷'
} else { } else {
if(index > -1) this.editFormData[index].label = '门店采购价(元)/件' if (index > -1) this.editFormData[index].label = '门店采购价(元)/件'
} }
}, },
// 获取上架数据 // 获取上架数据
...@@ -318,7 +316,7 @@ export default { ...@@ -318,7 +316,7 @@ export default {
} }
}, },
handleGoodsFocus() { handleGoodsFocus() {
if ((this.editForm?.goodsSource ?? '') === '')return this.$message.error('请选择商品来源') if ((this.editForm?.goodsSource ?? '') === '') return this.$message.error('请选择商品来源')
if (!this.goodsList?.length && this.requestFlag) return this.$message.error('暂无商品') if (!this.goodsList?.length && this.requestFlag) return this.$message.error('暂无商品')
}, },
// 获取更多上架商品 // 获取更多上架商品
...@@ -494,7 +492,7 @@ export default { ...@@ -494,7 +492,7 @@ export default {
.then(() => { .then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.cancelJump() this.cancelJump()
} }
...@@ -503,10 +501,11 @@ export default { ...@@ -503,10 +501,11 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.purchase-grounding{ .purchase-grounding {
.container{ .container {
padding: 0 0 20px; padding: 0 0 20px;
background: #fff; background: #fff;
.edit-title { .edit-title {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
...@@ -516,18 +515,22 @@ export default { ...@@ -516,18 +515,22 @@ export default {
margin: 0 0; margin: 0 0;
padding: 0 0 0 20px; padding: 0 0 0 20px;
} }
.goodsInfo-box{
.goodsInfo-box {
margin: 0 70px 0 154px; margin: 0 70px 0 154px;
background: #F9F9F9; background: #F9F9F9;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 15px 0; padding: 15px 0;
.item{
.item {
flex: 0 0 33%; flex: 0 0 33%;
.item_box{
.item_box {
display: flex; display: flex;
align-items: start; align-items: start;
.label{
.label {
flex-shrink: 0; flex-shrink: 0;
color: #666666; color: #666666;
width: 150px; width: 150px;
...@@ -537,11 +540,14 @@ export default { ...@@ -537,11 +540,14 @@ export default {
} }
} }
} }
.edit-container{
.edit-container {
margin-bottom: 16px; margin-bottom: 16px;
} }
.edit-form-container { .edit-form-container {
margin:20px 20px 0 0; margin: 20px 20px 0 0;
.table-title { .table-title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -549,10 +555,12 @@ export default { ...@@ -549,10 +555,12 @@ export default {
} }
} }
} }
.purchase-grounding.edit-purchase-grounding .select-merchant { .purchase-grounding.edit-purchase-grounding .select-merchant {
/* width: calc(98% - 140px); */ /* width: calc(98% - 140px); */
width: 98%; width: 98%;
} }
.merchant-table { .merchant-table {
margin: 0 20px; margin: 0 20px;
} }
......
...@@ -3,13 +3,16 @@ ...@@ -3,13 +3,16 @@
<div class="purchase-grounding-detail purchase-grounding edit-box"> <div class="purchase-grounding-detail purchase-grounding edit-box">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">基础信息</p> <p class="edit-title">基础信息</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :pageThat="this" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :pageThat="this"
:labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm"
:formData="editFormData" :formRules="editRule">
<div slot="sourceStrSpan">{{ editForm['goodsSourceStr'] }}</div> <div slot="sourceStrSpan">{{ editForm['goodsSourceStr'] }}</div>
<div slot="groundingGoodsInfo"> <div slot="groundingGoodsInfo">
<div class="goodsInfo-box"> <div class="goodsInfo-box">
<div class="item" v-for="(subItem, subIndex) in goodsDetailForm" :key="subIndex"> <div class="item" v-for="(subItem, subIndex) in goodsDetailForm" :key="subIndex">
<div v-if="subItem.addHtml" class="item_box"> <div v-if="subItem.addHtml" class="item_box">
<div class="label">{{ (membraneTypeList.includes(editForm.groundingGoodsInfo['goodsType']) ? subItem.label + `(元)/卷` : (subItem.label + '(元)/件')) }}:</div> <div class="label">{{ (membraneTypeList.includes(editForm.groundingGoodsInfo['goodsType']) ?
subItem.label + `(元)/卷` : (subItem.label + '(元)/件')) }}:</div>
<div class="value">{{ priceFilter(editForm.groundingGoodsInfo[subItem.value]) }}</div> <div class="value">{{ priceFilter(editForm.groundingGoodsInfo[subItem.value]) }}</div>
</div> </div>
<div v-else class="item_box"> <div v-else class="item_box">
...@@ -24,12 +27,15 @@ ...@@ -24,12 +27,15 @@
</div> </div>
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">上架门店</p> <p class="edit-title">上架门店</p>
<glsx-combi-form class="edit-form-container" ref="editFormMerchantRef" :isEdit="isEdit" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="merchantEditFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormMerchantRef" :isEdit="isEdit"
:labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm"
:formData="merchantEditFormData" :formRules="editRule">
<div slot="merchantTable" :style="{ width: `calc(100% - ${defaultLabelWidth} )` }"> <div slot="merchantTable" :style="{ width: `calc(100% - ${defaultLabelWidth} )` }">
<div class="table-title"> <div class="table-title">
上架门店列表 上架门店列表
</div> </div>
<GLTable ref="warehousListRef" :hasPage="false" :tableParams="tableParams" :tableData="editForm.merchantList"></GLTable> <GLTable ref="warehousListRef" :hasPage="false" :tableParams="tableParams" :tableData="editForm.merchantList">
</GLTable>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -131,7 +137,7 @@ export default { ...@@ -131,7 +137,7 @@ export default {
methods: { methods: {
keyDown() { keyDown() {
document.onkeydown = function() { document.onkeydown = function () {
var evt = window.event || arguments[0] var evt = window.event || arguments[0]
if (evt && evt.keyCode == 13) { if (evt && evt.keyCode == 13) {
if (typeof evt.cancelBubble != 'undefined') evt.cancelBubble = true if (typeof evt.cancelBubble != 'undefined') evt.cancelBubble = true
...@@ -154,7 +160,7 @@ export default { ...@@ -154,7 +160,7 @@ export default {
res.goodsSourceStr = !((res.goodsSource ?? '') === '') ? goodsSourceOptions[res.goodsSource - 0]?.label : '-' res.goodsSourceStr = !((res.goodsSource ?? '') === '') ? goodsSourceOptions[res.goodsSource - 0]?.label : '-'
let index = this.editFormData.findIndex(val => val.name == 'shopPurchasePrice') let index = this.editFormData.findIndex(val => val.name == 'shopPurchasePrice')
if (this.membraneTypeList?.includes(res?.goodsInfo?.goodsType)) { // 膜类商品 单位是卷 if (this.membraneTypeList?.includes(res?.goodsInfo?.goodsType)) { // 膜类商品 单位是卷
if(index > -1) this.editFormData[index].label = '门店采购价(元)/卷' if (index > -1) this.editFormData[index].label = '门店采购价(元)/卷'
} }
if (res?.goodsSource == 1) { // 自营 if (res?.goodsSource == 1) { // 自营
let index = this.goodsDetailForm.findIndex(val => val.value == 'purchasePrice') let index = this.goodsDetailForm.findIndex(val => val.value == 'purchasePrice')
...@@ -178,10 +184,11 @@ export default { ...@@ -178,10 +184,11 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.purchase-grounding{ .purchase-grounding {
.container{ .container {
padding: 0 0 20px; padding: 0 0 20px;
background: #fff; background: #fff;
.edit-title { .edit-title {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
...@@ -191,17 +198,21 @@ export default { ...@@ -191,17 +198,21 @@ export default {
margin: 0 0; margin: 0 0;
padding: 0 0 0 20px; padding: 0 0 0 20px;
} }
.goodsInfo-box{
.goodsInfo-box {
background: #F9F9F9; background: #F9F9F9;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 15px 0; padding: 15px 0;
.item{
.item {
flex: 0 0 33%; flex: 0 0 33%;
.item_box{
.item_box {
display: flex; display: flex;
align-items: start; align-items: start;
.label{
.label {
flex-shrink: 0; flex-shrink: 0;
color: #666666; color: #666666;
width: 150px; width: 150px;
...@@ -211,32 +222,39 @@ export default { ...@@ -211,32 +222,39 @@ export default {
} }
} }
} }
.edit-container{
.edit-container {
margin-bottom: 16px; margin-bottom: 16px;
} }
.edit-form-container { .edit-form-container {
margin:20px 20px 0 0; margin: 20px 20px 0 0;
.table-title { .table-title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.m-r-20 { .m-r-20 {
/deep/.glsx-combi-form-block{ ::v-deep.glsx-combi-form-block {
color: #666666; color: #666666;
&:nth-child(1){
.el-form-item__content{ &:nth-child(1) {
.el-form-item__content {
width: calc(100% - 154px); width: calc(100% - 154px);
} }
} }
} }
} }
} }
.purchase-grounding.purchase-grounding-detail .select-merchant { .purchase-grounding.purchase-grounding-detail .select-merchant {
/* width: calc(98% - 140px); */ /* width: calc(98% - 140px); */
width: 98%; width: 98%;
} }
.merchant-table { .merchant-table {
margin: 0 20px; margin: 0 20px;
} }
......
...@@ -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>
...@@ -12,15 +13,18 @@ ...@@ -12,15 +13,18 @@
</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">
<div slot="merchantName" slot-scope="scope"> <div slot="merchantName" slot-scope="scope">
<el-tooltip v-if="scope.scope.merchantList && scope.scope.merchantList.length > 0" placement="top" effect="light"> <el-tooltip v-if="scope.scope.merchantList && scope.scope.merchantList.length > 0" placement="top"
effect="light">
<div slot="content"> <div slot="content">
<div class="text-3 font-12 weight-6" style="line-height:24px">上架门店</div> <div class="text-3 font-12 weight-6" style="line-height:24px">上架门店</div>
<div class="merchant-wrap"> <div class="merchant-wrap">
<div class="text-6 font-12" style="line-height:24px" v-for="item in scope.scope.merchantList" :key="item">{{ item.merchantName }}</div> <div class="text-6 font-12" style="line-height:24px" v-for="item in scope.scope.merchantList"
:key="item">{{ item.merchantName }}</div>
</div> </div>
</div> </div>
<div class="use-store"> <div class="use-store">
<img src="@/assets/store.png" /> <img src="@/assets/store.png" />
...@@ -32,7 +36,7 @@ ...@@ -32,7 +36,7 @@
<template slot="status" slot-scope="scope"> <template slot="status" slot-scope="scope">
<div> <div>
<span :class="Spot[scope.scope.status]"></span> <span :class="Spot[scope.scope.status]"></span>
<span >{{ scope.scope.status | groundingStatus }}</span> <span>{{ scope.scope.status | groundingStatus }}</span>
</div> </div>
</template> </template>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
...@@ -54,7 +58,7 @@ export default { ...@@ -54,7 +58,7 @@ export default {
return { return {
size: 'small', size: 'small',
url: url, url: url,
Spot:['yellowSpot','ashSpot','greenSpot'], Spot: ['yellowSpot', 'ashSpot', 'greenSpot'],
searchForm: { searchForm: {
upgradeGoodsName: '', upgradeGoodsName: '',
type: '', type: '',
...@@ -307,7 +311,7 @@ export default { ...@@ -307,7 +311,7 @@ export default {
}, },
// 上架门店 // 上架门店
getMerchantList() { getMerchantList() {
this.$apis.grounding.getSimpleMerchantList({scene: 1, merchantId: this.$globalState?.session?.merchantId}).then(res => { this.$apis.grounding.getSimpleMerchantList({ scene: 1, merchantId: this.$globalState?.session?.merchantId }).then(res => {
this.baseData.merchantList = res || [] this.baseData.merchantList = res || []
this.getOptionsList('showFormData') this.getOptionsList('showFormData')
}) })
...@@ -428,6 +432,7 @@ export default { ...@@ -428,6 +432,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/mixin.scss'; @import '@/assets/css/mixin.scss';
.purchase { .purchase {
.table-header { .table-header {
display: flex; display: flex;
...@@ -435,45 +440,55 @@ export default { ...@@ -435,45 +440,55 @@ export default {
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 20px; margin-top: 20px;
h2 { h2 {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
} }
.glbtn { .glbtn {
left: 46px; left: 46px;
position: absolute; position: absolute;
} }
.btn { .btn {
right: 47px; right: 47px;
position: absolute; position: absolute;
} }
} }
.greenSpot { .greenSpot {
@include dot; @include dot;
background: $color-green; background: $color-green;
} }
.yellowSpot { .yellowSpot {
@include dot; @include dot;
background: $color-yellow; background: $color-yellow;
} }
.ashSpot { .ashSpot {
@include dot; @include dot;
background: $color-gray; background: $color-gray;
} }
.redSpot { .redSpot {
@include dot; @include dot;
background: $color-red; background: $color-red;
} }
.table-btns /deep/.el-button--text {
.table-btns ::v-deep.el-button--text {
min-width: 0 !important; min-width: 0 !important;
padding: 0; padding: 0;
} }
.use-store{
.use-store {
display: flex; display: flex;
font-size: 14px; font-size: 14px;
color: #5850ff; color: #5850ff;
align-items: center; align-items: center;
img { img {
width: 14px; width: 14px;
height: 12.98px; height: 12.98px;
...@@ -481,8 +496,9 @@ export default { ...@@ -481,8 +496,9 @@ export default {
} }
} }
} }
.merchant-wrap{
max-height:200px; .merchant-wrap {
max-height: 200px;
overflow: scroll; overflow: scroll;
} }
</style> </style>
...@@ -494,6 +510,7 @@ export default { ...@@ -494,6 +510,7 @@ export default {
width: 177px; width: 177px;
box-sizing: border-box; box-sizing: border-box;
} }
.el-tooltip__popper[x-placement^='top'] .popper__arrow { .el-tooltip__popper[x-placement^='top'] .popper__arrow {
border-color: #e4e7ed !important; border-color: #e4e7ed !important;
} }
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
</span> </span>
<span class="address"> <span class="address">
收货地址: 收货地址:
<span class="label">{{ $$(addressInfo, 'provinceName') }}{{ $$(addressInfo, 'cityName') }}{{ $$(addressInfo, 'areaName') }}{{ $$(addressInfo, 'contactAddress') }}</span> <span class="label">{{ $$(addressInfo, 'provinceName') }}{{ $$(addressInfo, 'cityName') }}{{ $$(addressInfo,
'areaName') }}{{ $$(addressInfo, 'contactAddress') }}</span>
</span> </span>
</div> </div>
</div> </div>
...@@ -30,14 +31,17 @@ ...@@ -30,14 +31,17 @@
<!-- :stretch="false" --> <!-- :stretch="false" -->
<div class="classifyContainer"> <div class="classifyContainer">
<el-tabs v-model="searchForm.goodsType" @tab-click="handleSearch" type="card"> <el-tabs v-model="searchForm.goodsType" @tab-click="handleSearch" type="card">
<el-tab-pane v-for="(item, i) in navList" :key="i" class="tabItem" :label="item.goodsTypeName" :name="item.goodsType"></el-tab-pane> <el-tab-pane v-for="(item, i) in navList" :key="i" class="tabItem" :label="item.goodsTypeName"
:name="item.goodsType"></el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<div class="searchCon"> <div class="searchCon">
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleRest"></GLCombiForm> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
@handleRest="handleRest"></GLCombiForm>
</div> </div>
<div class="goodsCon"> <div class="goodsCon">
<div class="goodsItemCon" v-for="(item, index) in purchaseList" :class="[{ active: item.active }, { last: index === purchaseList.length - 1 }]" :key="index" > <div class="goodsItemCon" v-for="(item, index) in purchaseList"
:class="[{ active: item.active }, { last: index === purchaseList.length - 1 }]" :key="index">
<!-- 图片{{ item.thumbUrl }} --> <!-- 图片{{ item.thumbUrl }} -->
<img :src="item.thumbUrl" class="img" alt="" /> <img :src="item.thumbUrl" class="img" alt="" />
<span class="goodsName one-line-ellipsis">{{ item.goodsName }}</span> <span class="goodsName one-line-ellipsis">{{ item.goodsName }}</span>
...@@ -52,7 +56,9 @@ ...@@ -52,7 +56,9 @@
</div> </div>
</div> </div>
<div class="pageCon"> <div class="pageCon">
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNum" :page-sizes="[10, 20, 30, 40]" :page-size="page.pageSize" :total="total" layout="->,prev,pager,next" /> <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="page.pageNum" :page-sizes="[10, 20, 30, 40]" :page-size="page.pageSize" :total="total"
layout="->,prev,pager,next" />
</div> </div>
</div> </div>
<!-- 购物车组件 --> <!-- 购物车组件 -->
...@@ -116,7 +122,7 @@ export default { ...@@ -116,7 +122,7 @@ export default {
this.listWithPagePurchaseInfo() this.listWithPagePurchaseInfo()
this.addressGet() this.addressGet()
}, },
mounted() {}, mounted() { },
methods: { methods: {
orderFrom() { orderFrom() {
this.addressComVisible = true this.addressComVisible = true
...@@ -160,7 +166,7 @@ export default { ...@@ -160,7 +166,7 @@ export default {
}, },
// 获取类目列表 // 获取类目列表
getGoodsCategoryConfiguration() { getGoodsCategoryConfiguration() {
this.$apis.sysBase.getGoodsCategoryConfiguration({shoppingMallFlag: true }).then(result => { this.$apis.sysBase.getGoodsCategoryConfiguration({ shoppingMallFlag: true }).then(result => {
const { list } = result const { list } = result
if (list.length) { if (list.length) {
const navList = list.map(({ categoryType, categoryName }) => { const navList = list.map(({ categoryType, categoryName }) => {
...@@ -179,7 +185,7 @@ export default { ...@@ -179,7 +185,7 @@ export default {
.then(result => { .then(result => {
if (result) { if (result) {
this.addressInfo = result this.addressInfo = result
console.log( this.addressInfo) console.log(this.addressInfo)
} }
if (this.showOrderCom) { if (this.showOrderCom) {
...@@ -213,16 +219,20 @@ export default { ...@@ -213,16 +219,20 @@ export default {
max-width: 1350px; max-width: 1350px;
margin: 0 auto; margin: 0 auto;
overflow: scroll; overflow: scroll;
.bg { .bg {
background: #fff; background: #fff;
} }
.d2-header-switch { .d2-header-switch {
display: none; display: none;
} }
.d2-container-content { .d2-container-content {
margin: 20px auto; margin: 20px auto;
background: #fff; background: #fff;
} }
.shopMallCon { .shopMallCon {
padding: 0 0 20px !important; padding: 0 0 20px !important;
} }
...@@ -246,9 +256,11 @@ export default { ...@@ -246,9 +256,11 @@ export default {
margin: 0 16px 16px; margin: 0 16px 16px;
overflow: hidden; overflow: hidden;
padding: 8px 8px 16px; padding: 8px 8px 16px;
&:hover{
&:hover {
border: 1px solid #5850ff; border: 1px solid #5850ff;
} }
&.active { &.active {
border: 1px solid #5850ff; border: 1px solid #5850ff;
} }
...@@ -349,7 +361,7 @@ export default { ...@@ -349,7 +361,7 @@ export default {
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
> span { >span {
margin-right: 25px; margin-right: 25px;
margin-bottom: 15px; margin-bottom: 15px;
} }
...@@ -372,7 +384,8 @@ export default { ...@@ -372,7 +384,8 @@ export default {
width: 670px !important; width: 670px !important;
min-width: 670px; min-width: 670px;
} }
/deep/ .name {
::v-deep .name {
width: 20px !important; width: 20px !important;
} }
} }
......
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
<template slot="filmNum" slot-scope="scope"> <template slot="filmNum" slot-scope="scope">
<el-form :ref="'addForm' + scope.index" :model="scope.scope" size="small" :rules="rules"> <el-form :ref="'addForm' + scope.index" :model="scope.scope" size="small" :rules="rules">
<el-form-item style="margin-bottom: 0px" prop="filmNum"> <el-form-item style="margin-bottom: 0px" prop="filmNum">
<el-input v-model="scope.scope.filmNum" placeholder="请输入" maxlength="50" @input="e => handleInputFilmNum(e, scope.index)"></el-input> <el-input v-model="scope.scope.filmNum" placeholder="请输入" maxlength="50"
@input="e => handleInputFilmNum(e, scope.index)"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
...@@ -155,9 +156,11 @@ export default { ...@@ -155,9 +156,11 @@ export default {
color: #666666ff; color: #666666ff;
font-size: 14px; font-size: 14px;
margin-bottom: 16px; margin-bottom: 16px;
span { span {
color: #333333ff; color: #333333ff;
} }
.add-btn { .add-btn {
font-size: 14px; font-size: 14px;
color: #5850ff; color: #5850ff;
...@@ -167,18 +170,22 @@ export default { ...@@ -167,18 +170,22 @@ export default {
padding: 6px 16px; padding: 6px 16px;
} }
} }
.table-wrap { .table-wrap {
box-sizing: border-box; box-sizing: border-box;
margin-top: 16px; margin-top: 16px;
/deep/ .el-form-item__error {
::v-deep .el-form-item__error {
padding-top: 2px; padding-top: 2px;
z-index: 9999999; z-index: 9999999;
position: static; position: static;
} }
/deep/ td.el-table__cell {
::v-deep td.el-table__cell {
height: 64px; height: 64px;
} }
} }
// .lookNumber { // .lookNumber {
// font-size: 14px; // font-size: 14px;
// color: #5850ff !important; // color: #5850ff !important;
...@@ -186,11 +193,12 @@ export default { ...@@ -186,11 +193,12 @@ export default {
// margin-left: 8px; // margin-left: 8px;
// } // }
.look-card-wrap { .look-card-wrap {
/deep/.el-table th.el-table__cell > .cell { ::v-deep.el-table th.el-table__cell>.cell {
padding: 0 16px; padding: 0 16px;
text-align: center; text-align: center;
} }
/deep/.el-table__body td.el-table__cell {
::v-deep.el-table__body td.el-table__cell {
text-align: center; text-align: center;
} }
} }
......
<template> <template>
<el-drawer class="shoppingCartDrawerCon" title="收货地址管理" size="500px" :visible.sync="dialogShow" :direction="direction"> <el-drawer class="shoppingCartDrawerCon" title="收货地址管理" size="500px" :visible.sync="dialogShow"
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="100px" default-width="350px" :form-ref="editChildRef" :form-obj="editForm" :form-data="editFormData" :form-rules="editRule"> :direction="direction">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="100px" default-width="350px"
:form-ref="editChildRef" :form-obj="editForm" :form-data="editFormData" :form-rules="editRule">
<span slot="provincesAndCities"> <span slot="provincesAndCities">
<!-- slot-scope="scope" --> <!-- slot-scope="scope" -->
<el-cascader v-model="editForm.provincesAndCities" size="mini" ref="cascader" placeholder="请选择 省/市/区" style="width:350px" :options="provincesAndCities_options" :props="{ label: 'name', value: 'code', children: 'childrenList' }" /> <el-cascader v-model="editForm.provincesAndCities" size="mini" ref="cascader" placeholder="请选择 省/市/区"
style="width:350px" :options="provincesAndCities_options"
:props="{ label: 'name', value: 'code', children: 'childrenList' }" />
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<div class="footer-btn"> <div class="footer-btn">
...@@ -116,7 +120,7 @@ export default { ...@@ -116,7 +120,7 @@ export default {
} }
} }
}, },
created() {}, created() { },
methods: { methods: {
// 获取省市区信息 // 获取省市区信息
getAreaInfo() { getAreaInfo() {
...@@ -155,30 +159,33 @@ export default { ...@@ -155,30 +159,33 @@ export default {
this.dialogShow = false this.dialogShow = false
this.$emit('handleConfirmAddress') this.$emit('handleConfirmAddress')
}) })
.catch(err => {}) .catch(err => { })
} }
}) })
}, },
navBack() {} navBack() { }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.shoppingCartDrawerCon { .shoppingCartDrawerCon {
// position: relative; // position: relative;
/deep/ .el-drawer__header { ::v-deep .el-drawer__header {
border-bottom: 1px solid #e7eaec; border-bottom: 1px solid #e7eaec;
margin-bottom: 20px; margin-bottom: 20px;
padding-bottom: 10px; padding-bottom: 10px;
font-weight: 600; font-weight: 600;
font-size: 20px; font-size: 20px;
} }
/deep/ .el-textarea {
::v-deep .el-textarea {
.el-textarea__inner { .el-textarea__inner {
height: auto !important; height: auto !important;
} }
} }
.footer-btn { .footer-btn {
text-align: center; text-align: center;
} }
......
<template> <template>
<GLDialog v-if="dialogShow" bigTitle="详细信息" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false" @onOk="dialogShow = false" @onCancel="dialogShow = false" :hasFooter="false"> <GLDialog v-if="dialogShow" bigTitle="详细信息" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false"
@onOk="dialogShow = false" @onCancel="dialogShow = false" :hasFooter="false">
<div class="detail-content" v-if="dialogShow"> <div class="detail-content" v-if="dialogShow">
<div class="addressTitle"> <div class="addressTitle">
<img src="@/images/addressIcon.webp" alt="" class="icon" /> <img src="@/images/addressIcon.webp" alt="" class="icon" />
...@@ -16,7 +17,8 @@ ...@@ -16,7 +17,8 @@
</span> </span>
<span class="address"> <span class="address">
收货地址: 收货地址:
<span class="label">{{ detailInfo.provinceName }}{{ detailInfo.cityName }}{{ detailInfo.areaName }}{{ detailInfo.contactAddress }}</span> <span class="label">{{ detailInfo.provinceName }}{{ detailInfo.cityName }}{{ detailInfo.areaName }}{{
detailInfo.contactAddress }}</span>
</span> </span>
<span class="address" v-if="detailInfo.purchaseOrderRemark"> <span class="address" v-if="detailInfo.purchaseOrderRemark">
备注: 备注:
...@@ -28,16 +30,34 @@ ...@@ -28,16 +30,34 @@
</span> </span>
</div> </div>
<div class="table-class"> <div class="table-class">
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" @refreshTable="refreshTable" :tableData="detailInfo.tableData" :pageConf="pageConf" :tableTotal="detailInfo.tableTotal"> <GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" @refreshTable="refreshTable"
:tableData="detailInfo.tableData" :pageConf="pageConf" :tableTotal="detailInfo.tableTotal">
<template slot="film" slot-scope="scope"> <template slot="film" slot-scope="scope">
<el-tooltip v-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1" placement="top" effect="light"> <el-tooltip v-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1" placement="top">
<div class="film-txt">(...{{ scope.scope.filmRollList.length }})</div> <div class="film-txt">(...{{ scope.scope.filmRollList.length }})</div>
<div slot="content"> <div slot="content">
<div class="tool-title">膜卷号</div> <div class="tool-title">膜卷号</div>
<div v-for="(item, index) in scope.scope.filmRollList" :key="index">{{ item }}</div> <div v-for="(item, index) in scope.scope.filmRollList" :key="index">{{ item }}</div>
</div> </div>
</el-tooltip> </el-tooltip>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">{{ scope.scope.filmRollList[0] }}</div> <div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">{{
scope.scope.filmRollList[0] }}</div>
<div v-else>--</div>
</template>
<template slot="upgradeGoodsName" slot-scope="scope">
<div>
<img v-if="scope.scope.refundStatus == 'Y'" class="retrun" src="@/assets/retrun.png" alt="">
<span>{{ scope.scope.upgradeGoodsName }}</span>
</div>
</template>
<template slot="carName" slot-scope="scope">
<!-- <div>{{ JSON.stringify(scope.scope.suitCarTypeList) }}</div> -->
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ item.carTypeName }}</div>
</div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip>
<div v-else>--</div> <div v-else>--</div>
</template> </template>
</GLTable> </GLTable>
...@@ -60,6 +80,15 @@ export default { ...@@ -60,6 +80,15 @@ export default {
default: () => { } default: () => { }
} }
}, },
filters: {
formatCar(list) {
console.log(list, 'list')
let str = list.map(item => {
return item.carTypeName
}).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
computed: { computed: {
dialogShow: { dialogShow: {
get() { get() {
...@@ -83,6 +112,7 @@ export default { ...@@ -83,6 +112,7 @@ export default {
{ {
label: '商品名称', label: '商品名称',
prop: 'upgradeGoodsName', prop: 'upgradeGoodsName',
addHtml: 'upgradeGoodsName',
width: 120, width: 120,
line: 1 line: 1
}, },
...@@ -97,9 +127,14 @@ export default { ...@@ -97,9 +127,14 @@ export default {
width: 100 width: 100
}, },
{ {
label: '适用车型',
addHtml: 'carName',
width: 200,
},
{
label: '系列', label: '系列',
prop: 'goodsName', prop: 'goodsName',
width: 100, width: 150,
line: 1 line: 1
}, },
{ {
...@@ -146,6 +181,11 @@ export default { ...@@ -146,6 +181,11 @@ export default {
return '¥' + cellValue.goodsTotalPrice return '¥' + cellValue.goodsTotalPrice
}, },
width: 120 width: 120
},
{
label: '备注',
prop: 'remark',
width: 150
} }
] ]
}, },
...@@ -215,6 +255,11 @@ export default { ...@@ -215,6 +255,11 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.retrun {
width: 15px;
height: 14px;
}
.addressTitle { .addressTitle {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -246,7 +291,7 @@ export default { ...@@ -246,7 +291,7 @@ export default {
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
> span { >span {
margin-right: 20px; margin-right: 20px;
margin-bottom: 10px; margin-bottom: 10px;
} }
...@@ -259,11 +304,13 @@ export default { ...@@ -259,11 +304,13 @@ export default {
min-width: 500px; min-width: 500px;
} }
} }
.film-txt { .film-txt {
font-size: 14px; font-size: 14px;
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
} }
.tool-title { .tool-title {
font-weight: 500 !important; font-weight: 500 !important;
font-size: 12px; font-size: 12px;
...@@ -282,6 +329,7 @@ export default { ...@@ -282,6 +329,7 @@ export default {
color: #666666; color: #666666;
line-height: 18px; line-height: 18px;
} }
.el-tooltip__popper[x-placement^='top'] .popper__arrow { .el-tooltip__popper[x-placement^='top'] .popper__arrow {
border-color: #e4e7ed !important; border-color: #e4e7ed !important;
} }
......
<template>
<GLDialog v-if="dialogShow" bigTitle="退货" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false"
@onOk="handleConfirm" @onCancel="dialogShow = false" :hasFooter="true">
<div class="detail-content" v-if="dialogShow">
<div class="addressTitle">
<img src="@/images/addressIcon.webp" alt="" class="icon" />
<span class="title">{{ paramsObj.merchantName }}</span>
</div>
<div class="address-info" v-if="paramsObj.purchaseType == 1">
<span class="name">
收货人:
<span class="label">{{ detailInfo.contactName }}</span>
</span>
<span class="phone">
电话:
<span class="label">{{ detailInfo.contactPhone }}</span>
</span>
<span class="address">
收货地址:
<span class="label">{{ detailInfo.provinceName }}{{ detailInfo.cityName }}{{ detailInfo.areaName }}{{
detailInfo.contactAddress }}</span>
</span>
<span class="address" v-if="detailInfo.purchaseOrderRemark">
备注:
<span class="label">{{ detailInfo.purchaseOrderRemark }}</span>
</span>
<span class="address" v-if="detailInfo.rejectCause">
驳回原因:
<span class="label">{{ detailInfo.rejectCause }}</span>
</span>
</div>
<div class="table-class">
<!-- :pageConf="pageConf" -->
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" @refreshTable="refreshTable"
:tableData="detailInfo.tableData" :tableTotal="detailInfo.tableTotal">
<template slot="film" slot-scope="scope">
<el-tooltip v-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1" placement="top"
effect="light">
<div class="film-txt">(...{{ scope.scope.filmRollList.length }})</div>
<div slot="content">
<div class="tool-title">膜卷号</div>
<div v-for="(item, index) in scope.scope.filmRollList" :key="index">{{ item }}</div>
</div>
</el-tooltip>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">{{
scope.scope.filmRollList[0] }}</div>
<div v-else>--</div>
</template>
</GLTable>
<div class="tips">说明:支持对未发货商品进行退货处理,进行退货后,对应商品不再继续进行发货,不影响其他商品正常发货。</div>
</div>
</div>
</GLDialog>
</template>
<script>
import { membraneTypeList, goodsTypeList } from '@/utils/constants.js'
// import { purchaseOrderGoodsRefund } from '@/api/modules/purchaseOrder.js'
export default {
name: 'OrderDetailDialog',
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: () => { }
}
},
computed: {
dialogShow: {
get() {
if (this.visible) {
this.getDetail({ currentPage: 1, pageSize: 20 })
}
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
data() {
return {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
{
label: '商品名称',
prop: 'upgradeGoodsName',
width: 120,
line: 1
},
{
label: '商品编码',
prop: 'type',
width: 100
},
{
label: '规格',
prop: 'specificationData',
width: 100
},
{
label: '系列',
prop: 'goodsName',
width: 100,
line: 1
},
{
label: '所属分类',
prop: 'goodsTypeName',
width: 150
},
{
label: '采购数量',
prop: 'goodsNumber',
formatter: cellValue => {
// 商品来源 1-商城采购 2-自采入库
let list = this.paramsObj.purchaseType == 1 ? membraneTypeList : goodsTypeList
let attr = this.paramsObj.purchaseType == 1 ? 'goodsType' : 'goodsTypeName'
let condition = list.includes(cellValue[attr]) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件`
return condition
},
width: 100
},
{
label: '膜卷号',
prop: 'filmRollList',
addHtml: 'film',
width: 100
},
{
label: '库存总量',
prop: 'goodsTypeName',
formatter: cellValue => {
// 商品来源 1-商城采购 2-自采入库
let list = this.paramsObj.purchaseType == 1 ? membraneTypeList : goodsTypeList
let attr = this.paramsObj.purchaseType == 1 ? 'goodsType' : 'goodsTypeName'
let unit = list.includes(cellValue[attr]) ? '米' : '件'
// let condition = list.includes(cellValue[attr]) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件`
let condition = (cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : cellValue.goodsNumber) + unit
return condition
},
width: 100
},
{
label: '采购总价/元',
prop: 'goodsTotalPrice',
formatter: cellValue => {
return '¥' + cellValue.goodsTotalPrice
},
width: 120
}
]
},
detailInfo: {}
}
},
created() {
this.dynamicParams()
},
methods: {
handleConfirm() {
let selectedData = this.$refs.purchaseOrderDetailTable.mutiSelectArr[this.tableParams.mutiSelectName]
// selectedData = selectedData.filter(item => item.refundStatus == 'N')
if (selectedData.some(item => item.refundStatus == 'N')) {
return this.$message.error('商品已退货,请确认后重新操作');
}
let params = {
orderCode: this.paramsObj.orderCode,
purchaseOrderGoodsIdList: selectedData.map(item => item.id)
}
console.log(selectedData, 'selectedData')
this.$apis.purchaseShopping.purchaseOrderGoodsRefund(params).then(res => {
console.log(res)
this.$message.success('操作成功')
this.dialogShow = false
this.$emit('handleConfirm')
}).catch((err) => {
console.log(err)
})
// this.dialogShow = false
},
dynamicParams() {
// if (this.paramsObj.purchaseType == 1) {
let idx = this.tableParams.tableColumns.findIndex(item => item.label == '膜卷号')
this.tableParams.tableColumns.splice(idx, 1)
this.tableParams.tableColumns.push(
{
label: '已发货数量',
prop: 'purchaseNumber',
width: 110,
line: 1,
formatter: cellValue => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
}
},
// {
// label: '已入库数量',
// prop: 'inputNumber',
// width: 110,
// line: 1,
// formatter: cellValue => {
// return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.inputNumber}米` : `${cellValue.inputNumber}件`
// }
// }
)
// } else {
// this.tableParams.tableColumns.push(
// {
// label: '入库仓库',
// prop: 'putYqMerchantName',
// width: 100,
// line: 1
// },
// {
// label: '入库门店',
// prop: 'putMerchantName',
// width: 100,
// line: 1
// }
// )
// }
},
handleDetailClose() {
this.dialogShow = false
},
refreshTable(pageObj) {
this.getDetail(pageObj)
},
getDetail(pageObj) {
this.$apis.purchaseShopping.purchaseOrderDetail({ orderCode: this.paramsObj.orderCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then(res => {
this.detailInfo = res
this.detailInfo.tableData = res.pagination.list
this.detailInfo.tableTotal = res.pagination.total
})
}
}
}
</script>
<style lang="scss" scoped>
.tips {
margin-top: 10px;
color: #999999;
}
.addressTitle {
display: flex;
align-items: center;
.title {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
}
.icon {
width: 28px;
height: 28px;
margin-right: 8px;
}
}
.address-info {
display: flex;
box-sizing: border-box;
align-items: center;
// justify-content: space-between;
flex-wrap: wrap;
width: 100%;
// height: 36px;
padding: 0 20px;
margin-top: 10px;
font-size: 14px;
color: #666666;
>span {
margin-right: 20px;
margin-bottom: 10px;
}
.label {
color: #333333;
}
.address {
min-width: 500px;
}
}
.film-txt {
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
.tool-title {
font-weight: 500 !important;
font-size: 12px;
color: #3a3a3a;
margin-bottom: 4px;
}
</style>
<style>
.el-tooltip__popper.is-light {
background: #ffffff;
border: 1px solid #e5e5e5 !important;
box-shadow: 0 8px 20px 0 #00000033;
width: 177px;
box-sizing: border-box;
font-size: 12px;
color: #666666;
line-height: 18px;
}
.el-tooltip__popper[x-placement^='top'] .popper__arrow {
border-color: #e4e7ed !important;
}
.el-tooltip__popper[x-placement^='top'] .popper__arrow:after {
border-bottom-color: #e4e7ed !important;
}
</style>
...@@ -2,77 +2,50 @@ ...@@ -2,77 +2,50 @@
<template> <template>
<div class="purchase"> <div class="purchase">
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" <GLCombiForm ref="showSearch" :rowNumber="2" :formObj="searchForm" :formData="showFormData"
:rowNumber="2" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<h2>采购订单列表</h2> <h2>采购订单列表</h2>
<div> <div>
<GLButton type="primary" <GLButton type="primary" size="small" @click="handleCreatePurchase" fn="创建采购">商城采购</GLButton>
size="small" <GLButton type="primary" plain size="small" @click="handlePutStprage" fn="自采入库">自采入库</GLButton>
@click="handleCreatePurchase" <el-button size="small" @click="exportExcel">导出</el-button>
fn="创建采购">商城采购</GLButton>
<GLButton type="primary"
plain
size="small"
@click="handlePutStprage"
fn="自采入库">自采入库</GLButton>
<el-button size="small"
@click="exportExcel">导出</el-button>
</div> </div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="orderRef" <GLTable ref="orderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:getListApi="getListApi" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"> @setTableFinishFun="setTableFinishFun">
<template slot="deliveryStatus" <template slot="deliveryStatus" slot-scope="scope">
slot-scope="scope">
<div> <div>
<span v-if="scope.scope.deliveryStatus" <span v-if="scope.scope.deliveryStatus" :class="deliveryStatusOpt[scope.scope.deliveryStatus]"></span>
:class="deliveryStatusOpt[scope.scope.deliveryStatus]"></span>
<span>{{ scope.scope.deliveryStatus | deliveryStatus }}</span> <span>{{ scope.scope.deliveryStatus | deliveryStatus }}</span>
</div> </div>
</template> </template>
<template slot="putStatus" <template slot="putStatus" slot-scope="scope">
slot-scope="scope">
<div> <div>
<span v-if="scope.scope.putStatus" <span v-if="scope.scope.putStatus"
:class="[scope.scope.putStatus == 1 ? 'ashSpot' : scope.scope.putStatus == 2 ? 'greenSpot' : 'yellowSpot']"></span> :class="[scope.scope.putStatus == 1 ? 'ashSpot' : scope.scope.putStatus == 2 ? 'greenSpot' : 'yellowSpot']"></span>
<span>{{ scope.scope.putStatus | putOrderStatus }}</span> <span>{{ scope.scope.putStatus | putOrderStatus }}</span>
</div> </div>
</template> </template>
<template slot="status" <template slot="status" slot-scope="scope">
slot-scope="scope">
<div> <div>
<span v-if="scope.scope.status" <span v-if="scope.scope.status" :class="Spot[scope.scope.status - 1]"></span>
:class="Spot[scope.scope.status-1]"></span> <span v-if="scope.scope.status == 4 || scope.scope.status == 6 || scope.scope.status == 7">已驳回</span>
<span
v-if="scope.scope.status==4||scope.scope.status==6||scope.scope.status==7">已驳回</span>
<span v-else>{{ scope.scope.status | orderStatus }}</span> <span v-else>{{ scope.scope.status | orderStatus }}</span>
</div> </div>
</template> </template>
<div class="table-btns" <div class="table-btns" slot="auth-button" slot-scope="scope">
slot="auth-button" <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="2"></GLTableButton>
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<orderDeatilDialog :visible.sync="detailVisible" <orderDeatilDialog :visible.sync="detailVisible" v-if="detailVisible" :paramsObj="paramsObj"></orderDeatilDialog>
v-if="detailVisible" <orderReturnDialog :visible.sync="detailReturnVisible" v-if="detailReturnVisible" :paramsObj="paramsObj"
:paramsObj="paramsObj"></orderDeatilDialog> @handleConfirm="handleDetailReturnConfirm"></orderReturnDialog>
</div> </div>
</template> </template>
...@@ -80,11 +53,13 @@ ...@@ -80,11 +53,13 @@
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import orderDeatilDialog from './components/orderDetailDialog' import orderDeatilDialog from './components/orderDetailDialog'
import orderReturnDialog from './components/orderReturnDialog'
import { defaultStatusOptions, defaultDeliveryStatusOptions, putStatusOptions, purchaseTypeList } from '@/utils/constants.js' import { defaultStatusOptions, defaultDeliveryStatusOptions, putStatusOptions, purchaseTypeList } from '@/utils/constants.js'
export default { export default {
name: 'PurchaseOrder', name: 'PurchaseOrder',
components: { components: {
orderDeatilDialog orderDeatilDialog,
orderReturnDialog
}, },
data() { data() {
return { return {
...@@ -108,6 +83,7 @@ export default { ...@@ -108,6 +83,7 @@ export default {
paramsObj: {}, paramsObj: {},
// 查看门店 // 查看门店
detailVisible: false, detailVisible: false,
detailReturnVisible: false,
showFormData: [ showFormData: [
{ {
label: '订单编号', label: '订单编号',
...@@ -227,11 +203,24 @@ export default { ...@@ -227,11 +203,24 @@ export default {
type: 'text' type: 'text'
}, },
condition: row => { condition: row => {
return (row.purchaseType == 1 && row.deliveryStatus == 2) || (row.purchaseType == 1 && row.deliveryStatus == 3)||(row.purchaseType == 1 && row.deliveryStatus == 4) return (row.purchaseType == 1 && row.deliveryStatus == 2) || (row.purchaseType == 1 && row.deliveryStatus == 3) || (row.purchaseType == 1 && row.deliveryStatus == 4)
}, },
listeners: { listeners: {
click: this.handleDispatch click: this.handleDispatch
} }
},
{
type: 'el-button',
name: '退货',
attrs: {
type: 'text'
},
condition: row => {
return [1, 2, 5].includes(row.status) && row.purchaseType == 1
},
listeners: {
click: this.handleReturnedProducts
}
} }
], ],
// 表格 // 表格
...@@ -353,6 +342,9 @@ export default { ...@@ -353,6 +342,9 @@ export default {
}, },
methods: { methods: {
handleDetailReturnConfirm() {
this.$refs.orderRef.refreshTable()
},
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.placeOrderTimeStr.length) { if (this.searchForm.placeOrderTimeStr.length) {
...@@ -436,6 +428,15 @@ export default { ...@@ -436,6 +428,15 @@ export default {
} }
this.detailVisible = true this.detailVisible = true
}, },
// 查看详情
handleReturnedProducts(row) {
this.paramsObj = {
orderCode: row.orderCode,
merchantName: row.merchantName,
purchaseType: row.purchaseType
}
this.detailReturnVisible = true
},
//自采入库-编辑 //自采入库-编辑
handleEdit(row) { handleEdit(row) {
this.$router.push({ this.$router.push({
...@@ -542,6 +543,7 @@ export default { ...@@ -542,6 +543,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/mixin.scss'; @import '@/assets/css/mixin.scss';
.purchase { .purchase {
.table-header { .table-header {
display: flex; display: flex;
...@@ -549,39 +551,48 @@ export default { ...@@ -549,39 +551,48 @@ export default {
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 20px; margin-top: 20px;
h2 { h2 {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
} }
.glbtn { .glbtn {
left: 46px; left: 46px;
position: absolute; position: absolute;
} }
.btn { .btn {
right: 47px; right: 47px;
position: absolute; position: absolute;
} }
} }
.greenSpot { .greenSpot {
@include dot; @include dot;
background: $color-green; background: $color-green;
} }
.yellowSpot { .yellowSpot {
@include dot; @include dot;
background: $color-yellow; background: $color-yellow;
} }
.ashSpot { .ashSpot {
@include dot; @include dot;
background: $color-gray; background: $color-gray;
} }
.redSpot { .redSpot {
@include dot; @include dot;
background: $color-red; background: $color-red;
} }
.table-btns /deep/.el-button--text {
.table-btns ::v-deep.el-button--text {
min-width: 0 !important; min-width: 0 !important;
padding: 0; padding: 0;
width: 200px;
} }
} }
</style> </style>
...@@ -6,22 +6,29 @@ ...@@ -6,22 +6,29 @@
<el-button type="primary" size="small" @click="addLine">添加一行</el-button> <el-button type="primary" size="small" @click="addLine">添加一行</el-button>
</div> </div>
<el-form ref="addForm" :model="formdata" size="small" :rules="rules"> <el-form ref="addForm" :model="formdata" size="small" :rules="rules">
<GLTable ref="orderRef" :tableData="formdata.tableData" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :hasPage="false"> <GLTable ref="orderRef" :tableData="formdata.tableData" :noDataImg="url" :searchForm="tableSearchForm"
:tableParams="tableParams" :hasPage="false">
<template slot="upgradeGoodsId" slot-scope="scope"> <template slot="upgradeGoodsId" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.upgradeGoodsId'" :rules="rules.upgradeGoodsId"> <el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.upgradeGoodsId'"
<el-select style="width: 100%" v-model="scope.scope.upgradeGoodsId" placeholder="请选择" @change="getGoodsName(scope.scope, scope.scope.upgradeGoodsId)"> :rules="rules.upgradeGoodsId">
<el-option v-for="item in goodsList" :key="item.upgradeGoodsId" :label="item.goodsName" :value="item.upgradeGoodsId"></el-option> <el-select style="width: 100%" v-model="scope.scope.upgradeGoodsId" placeholder="请选择"
@change="getGoodsName(scope.scope, scope.scope.upgradeGoodsId)">
<el-option v-for="item in goodsList" :key="item.upgradeGoodsId" :label="item.goodsName"
:value="item.upgradeGoodsId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
<template slot="goodsNumber" slot-scope="scope"> <template slot="goodsNumber" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.goodsNumber'" :rules="rules.goodsNumber"> <el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.goodsNumber'"
<el-input v-model="scope.scope.goodsNumber" placeholder="请输入" @blur="handleCalculate(scope.scope, 'goodsNumber')"></el-input> :rules="rules.goodsNumber">
<el-input v-model="scope.scope.goodsNumber" placeholder="请输入"
@blur="handleCalculate(scope.scope, 'goodsNumber')"></el-input>
</el-form-item> </el-form-item>
</template> </template>
<template slot="film" slot-scope="scope"> <template slot="film" slot-scope="scope">
<div v-if="manageMode && goodsTypeList.includes(scope.scope.goodsTypeName)"> <div v-if="manageMode && goodsTypeList.includes(scope.scope.goodsTypeName)">
<el-button v-if="!scope.scope.filmRollList" type="text" @click="handleSelectFilm(scope.scope, scope.index)">请选择</el-button> <el-button v-if="!scope.scope.filmRollList" type="text"
@click="handleSelectFilm(scope.scope, scope.index)">请选择</el-button>
<div v-else> <div v-else>
<span class="film-txt">...({{ scope.scope.filmRollList.length }})</span> <span class="film-txt">...({{ scope.scope.filmRollList.length }})</span>
<el-button type="text" @click="handleSelectFilm(scope.scope, scope.index)">重新选择</el-button> <el-button type="text" @click="handleSelectFilm(scope.scope, scope.index)">重新选择</el-button>
...@@ -30,28 +37,38 @@ ...@@ -30,28 +37,38 @@
<div v-else>--</div> <div v-else>--</div>
</template> </template>
<template slot="upgradePurchasePrice" slot-scope="scope"> <template slot="upgradePurchasePrice" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.upgradePurchasePrice'" :rules="rules.upgradePurchasePrice"> <el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.upgradePurchasePrice'"
<el-input v-model="scope.scope.upgradePurchasePrice" placeholder="请输入" @blur="handleCalculate(scope.scope, 'upgradePurchasePrice')"></el-input> :rules="rules.upgradePurchasePrice">
<el-input v-model="scope.scope.upgradePurchasePrice" placeholder="请输入"
@blur="handleCalculate(scope.scope, 'upgradePurchasePrice')"></el-input>
</el-form-item> </el-form-item>
</template> </template>
<template slot="goodsTotalPrice" slot-scope="scope"> <template slot="goodsTotalPrice" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.goodsTotalPrice'" :rules="rules.goodsTotalPrice"> <el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.goodsTotalPrice'"
<el-input v-model="scope.scope.goodsTotalPrice" placeholder="请输入" @blur="handleCalculate(scope.scope, 'goodsTotalPrice')"></el-input> :rules="rules.goodsTotalPrice">
<el-input v-model="scope.scope.goodsTotalPrice" placeholder="请输入"
@blur="handleCalculate(scope.scope, 'goodsTotalPrice')"></el-input>
</el-form-item> </el-form-item>
</template> </template>
<!-- 入库仓库 --> <!-- 入库仓库 -->
<template slot="putYqMerchantId" slot-scope="scope"> <template slot="putYqMerchantId" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.putYqMerchantId'" :rules="rules.putYqMerchantId"> <el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.putYqMerchantId'"
<el-select style="width: 100%" v-model="scope.scope.putYqMerchantId" placeholder="请选择" @change="handleSelect(scope.scope, scope.scope.putYqMerchantId)"> :rules="rules.putYqMerchantId">
<el-option v-for="item in storeUsageList" :key="item.merchantNo" :label="item.merchantName" :value="item.merchantNo"></el-option> <el-select style="width: 100%" v-model="scope.scope.putYqMerchantId" placeholder="请选择"
@change="handleSelect(scope.scope, scope.scope.putYqMerchantId)">
<el-option v-for="item in storeUsageList" :key="item.merchantNo" :label="item.merchantName"
:value="item.merchantNo"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
<!-- 入库门店 --> <!-- 入库门店 -->
<template slot="putMerchantId" slot-scope="scope"> <template slot="putMerchantId" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.putMerchantId'" :rules="rules.putMerchantId"> <el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.putMerchantId'"
<el-select style="width: 100%" v-model="scope.scope.putMerchantId" placeholder="请选择" @change="handleStoreSelect(scope.scope, scope.scope.putMerchantId)"> :rules="rules.putMerchantId">
<el-option v-for="item in scope.scope.refByYqShopList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId"></el-option> <el-select style="width: 100%" v-model="scope.scope.putMerchantId" placeholder="请选择"
@change="handleStoreSelect(scope.scope, scope.scope.putMerchantId)">
<el-option v-for="item in scope.scope.refByYqShopList" :key="item.merchantId" :label="item.merchantName"
:value="item.merchantId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
...@@ -405,26 +422,31 @@ export default { ...@@ -405,26 +422,31 @@ export default {
.container { .container {
background: #fff; background: #fff;
padding: 20px; padding: 20px;
.table-header { .table-header {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: 15px; margin-bottom: 15px;
} }
.title { .title {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #333333; color: #333333;
margin-bottom: 15px; margin-bottom: 15px;
} }
/deep/ .el-form-item__error {
::v-deep .el-form-item__error {
padding-top: 2px; padding-top: 2px;
z-index: 9999999; z-index: 9999999;
position: static; position: static;
} }
/deep/ td.el-table__cell {
::v-deep td.el-table__cell {
height: 64px; height: 64px;
} }
.film-txt { .film-txt {
box-sizing: border-box; box-sizing: border-box;
height: 32px; height: 32px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!