Commit 44269e9f by chenwq

采购订单,膜卷号

1 parent 27ecc93d
......@@ -4,7 +4,7 @@ const path = 'dj.api.smarcarlife.'
const path2 = 'dj.api.goodsInfo.'
const path3 = 'dj.api.smartcarlife.'
// 分页查询采购订单
const getPurchaseOrderList = (params) => {
const getPurchaseOrderList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.page`
return http({
......@@ -15,7 +15,7 @@ const getPurchaseOrderList = (params) => {
})
}
// 采购订单取消/审核
const purchaseOrderCancelOrCheck = (params) => {
const purchaseOrderCancelOrCheck = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.cancelOrCheck`
return http({
......@@ -26,7 +26,7 @@ const purchaseOrderCancelOrCheck = (params) => {
returnAll: true
})
}
const purchaseOrderDelete = (params) => {
const purchaseOrderDelete = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smarcarlife.purchaseOrder.deleteByOrderCode`
return http({
......@@ -37,8 +37,20 @@ const purchaseOrderDelete = (params) => {
returnAll: true
})
}
// 库存管理模式
const getManageMode = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smarcarlife.stock.management.mode`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 查看采购订单
const purchaseOrderDetail = (params) => {
const purchaseOrderDetail = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.view`
return http({
......@@ -49,7 +61,7 @@ const purchaseOrderDetail = (params) => {
})
}
// 分页查询采购商城素材信息
const listWithPagePurchaseInfo = (params) => {
const listWithPagePurchaseInfo = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path2}listWithPage.purchaseInfo`
return http({
......@@ -72,9 +84,8 @@ const addressGet = (params = {}) => {
})
}
// 保存园区店商户收货地址
const addressSave = (params) => {
const addressSave = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}yqMerchantDeliveryAddress.save`
return http({
......@@ -86,7 +97,7 @@ const addressSave = (params) => {
}
// 按商品类目分组获取购物车列表
const listGroupByGoodsType = (params) => {
const listGroupByGoodsType = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.listGroupByGoodsType`
return http({
......@@ -97,9 +108,8 @@ const listGroupByGoodsType = (params) => {
})
}
// 更新购物车商品选中标识
const updateSelectedFlag = (params) => {
const updateSelectedFlag = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.updateSelectedFlag`
return http({
......@@ -110,7 +120,7 @@ const updateSelectedFlag = (params) => {
})
}
// 移除购物车商品
const shoppingCarRemove = (params) => {
const shoppingCarRemove = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.remove`
return http({
......@@ -122,7 +132,7 @@ const shoppingCarRemove = (params) => {
}
// 添加到购物车
const shoppingCarAdd = (params) => {
const shoppingCarAdd = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.add`
return http({
......@@ -133,8 +143,6 @@ const shoppingCarAdd = (params) => {
})
}
// 修改购物车商品数量
export function shoppingCarUpdateNumber(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
......@@ -146,12 +154,6 @@ export function shoppingCarUpdateNumber(params) {
})
}
// 添加采购订单
export function purchaseOrderAdd(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
......@@ -164,8 +166,6 @@ export function purchaseOrderAdd(params) {
})
}
export function exportExcel(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smarcarlife.purchaseOrder.export`
......@@ -200,7 +200,7 @@ export function getMerchantList(params) {
})
}
//查询园区店关联的4s店列表 -入库门店
const get4SRefByYqShopList = (params) => {
const get4SRefByYqShopList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.scenemerchantref.query4SRefByYqShop`
return http({
......@@ -231,7 +231,7 @@ export function checkShipper(params) {
method: 'POST',
data: params,
sign: true,
returnAll:true
returnAll: true
})
}
// 确认发货
......@@ -241,4 +241,4 @@ export function checkShipper(params) {
// return http(data)
// }
export default {checkShipper,get4SRefByYqShopList, selectByOrderCode,purchaseOrderDelete, getMerchantList, purchaseOrderPutIn, exportExcel, shoppingCarUpdateNumber, purchaseOrderAdd, shoppingCarAdd, shoppingCarRemove, updateSelectedFlag, listGroupByGoodsType, getPurchaseOrderList, purchaseOrderCancelOrCheck, purchaseOrderDetail, listWithPagePurchaseInfo, addressGet, addressSave }
\ No newline at end of file
export default { checkShipper, get4SRefByYqShopList, selectByOrderCode, purchaseOrderDelete, getManageMode, getMerchantList, purchaseOrderPutIn, exportExcel, shoppingCarUpdateNumber, purchaseOrderAdd, shoppingCarAdd, shoppingCarRemove, updateSelectedFlag, listGroupByGoodsType, getPurchaseOrderList, purchaseOrderCancelOrCheck, purchaseOrderDetail, listWithPagePurchaseInfo, addressGet, addressSave }
......@@ -5,24 +5,24 @@ html {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #F4F5FA;
background-color: #f4f5fa;
}
.purchase .container {
.purchase .container {
background: #ffffff;
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
}
.purchase .m-b-20 {
.purchase .m-b-20 {
margin-bottom: 20px;
}
.purchase .p-t-20 {
padding-top: 20px;
}
.pointer{
cursor: pointer;
.pointer {
cursor: pointer;
}
.carIcon {
display: inline-block;
......@@ -32,6 +32,10 @@ cursor: pointer;
background-size: 100% 100%;
margin-right: 4px;
}
.el-cascader-menu__wrap{
height: 204px!important;
}
\ No newline at end of file
.el-cascader-menu__wrap {
height: 204px !important;
}
.message-Z-zinde {
z-index: 9999 !important;
}
......@@ -24,6 +24,7 @@
</GLTable>
<!-- 表格区域 end -->
</div>
<filmDialog :visible.sync="filmVisible" :info="info" @handleConfirm="handleFilmConfirm"></filmDialog>
<rejectDialog v-if="rejectDialogVisible" :visible.sync="rejectDialogVisible" @handleRejectConfirm="handleRejectConfirm"></rejectDialog>
</div>
</template>
......@@ -32,17 +33,19 @@
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import rejectDialog from './rejectDialog'
import filmDialog from '../purchaseOrder/components/FilmDialog'
import { groundingCheckStatusList, goodsSourceOptions } from '@/utils/constants.js'
export default {
name: 'purchaseCheck',
components: {
rejectDialog
rejectDialog,
filmDialog
},
data() {
return {
size: 'small',
url: url,
Spot:['yellowSpot','greenSpot','ashSpot','redSpot'],
Spot: ['yellowSpot', 'greenSpot', 'ashSpot', 'redSpot'],
searchForm: {
sortType: 2,
orderTimeStr: [],
......@@ -61,7 +64,7 @@ export default {
// 查看门店
detailVisible: false,
showFormData: [
{
{
label: '下单时间',
name: 'placeOrderTimeStr',
type: 'datePicker',
......@@ -100,7 +103,7 @@ export default {
optionList: [],
optionId: 'goodsType',
optionLabel: 'goodsTypeName',
optionsName: 'classificationOptions'
optionsName: 'classificationOptions'
},
{
label: '商品来源',
......@@ -299,13 +302,17 @@ export default {
rejectDialogVisible: false,
rejectObj: {},
tipsTitleStyle: 'style="font-size: 16px;color: #333333;"',
tipsContentStyle: 'style="font-size: 14px;color: #666666;"'
tipsContentStyle: 'style="font-size: 14px;color: #666666;"',
filmVisible: false,
goodsTypeList: ['自建商品-太阳膜', '自建商品-车衣', '自建商品-改色膜'],
manageMode: false
}
},
mounted() {
// 获取所属分类
this.getPurchaseGroundingSearchSelectData(1)
this.getManageMode()
},
methods: {
......@@ -325,6 +332,11 @@ export default {
this.getOptionsList('showFormData')
})
},
getManageMode() {
this.$apis.purchaseShopping.getManageMode({}).then(res => {
this.manageMode = res
})
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
......@@ -357,11 +369,20 @@ export default {
//审核
handleCheck(row) {
if (row?.goodsSource == 1) { // 自营商品
this.secondConfirm('审核', `<p ${this.tipsTitleStyle}>是否确定审核?</p><p ${this.tipsContentStyle}>审核通过后,系统会自动创建自采采购订单并自动入库,且无法撤回</p>`, 'purchaseCheck', 'auditPurchaseCheck', { id: row.id })
if (this.manageMode && this.goodsTypeList.includes(row.goodsTypeName)) {
this.info = row
this.filmVisible = !this.filmVisible
} else {
this.secondConfirm('审核', `<p ${this.tipsTitleStyle}>是否确定审核?</p><p ${this.tipsContentStyle}>审核通过后,系统会自动创建自采采购订单并自动入库,且无法撤回</p>`, 'purchaseCheck', 'auditPurchaseCheck', { id: row.id })
}
} else if (row?.goodsSource == 0) { // 嘀加商品
this.secondConfirm('审核', `<p ${this.tipsTitleStyle}>是否确定审核?</p><p ${this.tipsContentStyle}>审核通过后,系统会自动创建商城采购订单,且无法撤回</p>`, 'purchaseCheck', 'auditPurchaseCheck', { id: row.id })
}
},
handleFilmConfirm(list) {
this.filmVisible = !this.filmVisible
this.secondConfirm('审核', `<p ${this.tipsTitleStyle}>是否确定审核?</p><p ${this.tipsContentStyle}>审核通过后,系统会自动创建自采采购订单并自动入库,且无法撤回</p>`, 'purchaseCheck', 'auditPurchaseCheck', { id: this.info.id, filmRollList: list })
},
//驳回
handleReject(row) {
this.rejectObj = row
......
......@@ -7,7 +7,7 @@
</div>
<div>
最大可添加数量:
<span>{{ detailInfo.goodsNumber }}</span>
<span>{{ detailInfo[maxAddNumAttr] }}</span>
</div>
<div class="add-btn" @click="addLineTable">
添加一行
......@@ -44,6 +44,10 @@ export default {
info: {
type: Object,
default: () => { }
},
maxAddNumAttr: {
type: String,
default: 'goodsNumber'
}
},
watch: {
......@@ -112,7 +116,7 @@ export default {
}
},
addLineTable() {
if (this.filmRollList.length == this.detailInfo.goodsNumber) {
if (this.filmRollList.length == this.detailInfo[this.maxAddNumAttr]) {
return true
}
this.filmRollList.push({
......@@ -129,6 +133,14 @@ export default {
return true
}
}
if (this.filmRollList.length != this.detailInfo[this.maxAddNumAttr]) {
this.$message({
message: '请添加满足最大可添加数量的膜卷号',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
let list = this.filmRollList.map(item => item.filmNum)
this.$emit('handleConfirm', list)
}
......
......@@ -24,7 +24,18 @@
</span>
</div>
<div class="table-class">
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" @refreshTable="refreshTable" :tableData="detailInfo.tableData" :pageConf="pageConf" :tableTotal="detailInfo.tableTotal"></GLTable>
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" @refreshTable="refreshTable" :tableData="detailInfo.tableData" :pageConf="pageConf" :tableTotal="detailInfo.tableTotal">
<template slot="film" slot-scope="scope">
<el-tooltip v-if="scope.scope.filmRollList" content="fjdksl" 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>--</div>
</template>
</GLTable>
</div>
</div>
</GLDialog>
......@@ -41,7 +52,7 @@ export default {
},
paramsObj: {
type: Object,
default: () => {}
default: () => { }
}
},
computed: {
......@@ -84,7 +95,7 @@ export default {
{
label: '所属分类',
prop: 'goodsTypeName',
width: 100
width: 150
},
{
label: '采购数量',
......@@ -97,6 +108,12 @@ export default {
width: 100
},
{
label: '膜卷号',
prop: 'filmRollList',
addHtml: 'film',
width: 100
},
{
label: '库存总量',
prop: 'goodsTypeName',
formatter: cellValue => {
......@@ -125,6 +142,8 @@ export default {
methods: {
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: '已发货数量',
......@@ -224,4 +243,34 @@ export default {
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>
......@@ -20,10 +20,10 @@
</el-form-item>
</template>
<template slot="film" slot-scope="scope">
<div v-if="scope.scope.goodsName == '太阳膜'">
<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>
<div v-else>
{{ scope.scope.filmRollList.length }}
<span class="film-txt">...({{ scope.scope.filmRollList.length }})</span>
<el-button type="text" @click="handleSelectFilm(scope.scope, scope.index)">重新选择</el-button>
</div>
</div>
......@@ -106,7 +106,7 @@ export default {
putMerchantId: [{ required: true, message: '请选择入库门店', trigger: 'change' }]
},
formdata: {
tableData: [{ upgradeGoodsId: '', type: '', goodsName: '', goodsNumber: '', upgradePurchasePrice: '', goodsTotalPrice: '', putYqMerchantId: '', putYqMerchantName: '', putMerchantId: '', putMerchantName: '', refByYqShopList: [] }]
tableData: [{ upgradeGoodsId: '', type: '', goodsName: '', goodsTypeName: '', goodsNumber: '', upgradePurchasePrice: '', goodsTotalPrice: '', putYqMerchantId: '', putYqMerchantName: '', putMerchantId: '', putMerchantName: '', refByYqShopList: [] }]
},
tableParams: {
tableOption: true,
......@@ -121,8 +121,8 @@ export default {
prop: 'type'
},
{
label: '所属系列',
prop: 'goodsName'
label: '所属分类',
prop: 'goodsTypeName'
},
{
label: '采购数量',
......@@ -160,7 +160,9 @@ export default {
storeUsageList: [],
refByYqShopList: [],
filmVisible: false,
info: {}
info: {},
goodsTypeList: ['自建商品-太阳膜', '自建商品-车衣', '自建商品-改色膜'],
manageMode: false
}
},
components: {
......@@ -169,6 +171,7 @@ export default {
created() {
this.getfwsGoodsList()
this.getMerchantList()
this.getManageMode()
if (this.orderCode) this.getData()
},
methods: {
......@@ -178,6 +181,11 @@ export default {
if (this.storeUsageList.length == 1) this.defaultSelect()
})
},
getManageMode() {
this.$apis.purchaseShopping.getManageMode({}).then(res => {
this.manageMode = res
})
},
defaultSelect() {
let {
formdata: { tableData },
......@@ -208,13 +216,15 @@ export default {
purchaseOrderGoodsList.push({
upgradeGoodsId: item.upgradeGoodsId,
goodsName: item.goodsName,
goodsTypeName: item.goodsTypeName,
goodsNumber: item.goodsNumber,
upgradePurchasePrice: item.upgradePurchasePrice,
goodsTotalPrice: item.goodsTotalPrice,
putYqMerchantId: item.putYqMerchantId,
putYqMerchantName: item.putYqMerchantName,
putMerchantId: item.putMerchantId,
putMerchantName: item.putMerchantName
putMerchantName: item.putMerchantName,
filmRollList: item.filmRollList
})
})
let params = {
......@@ -274,6 +284,7 @@ export default {
if (item.upgradeGoodsId == id) {
data.type = item.type
data.goodsName = item.goodsCodeName
data.goodsTypeName = item.goodsTypeName
}
})
},
......@@ -356,6 +367,7 @@ export default {
upgradeGoodsId: '',
type: '',
goodsName: '',
goodsTypeName: '',
goodsNumber: '',
upgradePurchasePrice: '',
goodsTotalPrice: '',
......@@ -398,5 +410,17 @@ export default {
/deep/ td.el-table__cell {
height: 64px;
}
.film-txt {
box-sizing: border-box;
height: 32px;
line-height: 32px;
background: #f4f6fc;
border: 1px solid #eaeaec;
font-weight: 400;
font-size: 14px;
color: #666666;
padding: 6px;
margin-right: 6px;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!