Commit bb1b422c by 前端

Merge branch 'v4.21.1' into 'master'

V4.21.1

See merge request !3
2 parents 48775129 0f2c2335
import { http } from '@/main'
const path = 'dj.api.smarcarlife.'
// 发货单分页查询
const getDeliveryList = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.delivery.page`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 发货单详情查看
const getDeliveryDetail = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.delivery.detail`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 采购订单入库
const addPurchaseOrder = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.warehousing`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 发货单导出
export function exportExcel(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.delivery.export`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getDeliveryList, addPurchaseOrder, exportExcel,getDeliveryDetail }
\ No newline at end of file \ No newline at end of file
...@@ -60,4 +60,7 @@ const addSelfOrder = (params) => { ...@@ -60,4 +60,7 @@ const addSelfOrder = (params) => {
sign: true sign: true
}) })
} }
export default { addSelfOrder,getGoodsList,getProductInfo, getProductTypeBySceneId ,getfwsGoodsList} export default { addSelfOrder,getGoodsList,getProductInfo, getProductTypeBySceneId ,getfwsGoodsList}
...@@ -199,7 +199,17 @@ export function getMerchantList(params) { ...@@ -199,7 +199,17 @@ export function getMerchantList(params) {
sign: true sign: true
}) })
} }
//查询园区店关联的4s店列表 -入库门店
const get4SRefByYqShopList = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.scenemerchantref.query4SRefByYqShop`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//编辑 //编辑
export function selectByOrderCode(params) { export function selectByOrderCode(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
...@@ -212,6 +222,18 @@ export function selectByOrderCode(params) { ...@@ -212,6 +222,18 @@ export function selectByOrderCode(params) {
}) })
} }
// 是否有发货主体
export function checkShipper(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smarcarlife.purchaseOrder.checkShipper`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
})
}
// 确认发货 // 确认发货
// export function purchaseOrderConfirmDelivery(data) { // export function purchaseOrderConfirmDelivery(data) {
// params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` // params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
...@@ -219,4 +241,4 @@ export function selectByOrderCode(params) { ...@@ -219,4 +241,4 @@ export function selectByOrderCode(params) {
// return http(data) // return http(data)
// } // }
export default { selectByOrderCode,purchaseOrderDelete, getMerchantList, purchaseOrderPutIn, exportExcel, shoppingCarUpdateNumber, purchaseOrderAdd, shoppingCarAdd, shoppingCarRemove, updateSelectedFlag, listGroupByGoodsType, getPurchaseOrderList, purchaseOrderCancelOrCheck, purchaseOrderDetail, listWithPagePurchaseInfo, addressGet, addressSave }
\ No newline at end of file \ No newline at end of file
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 \ No newline at end of file
import { http,http_common } from '@/main' import { http, http_common } from '@/main'
const path = "dj.api." const path = "dj.api."
const defaultPath = 'scrm.api.carlife.' const defaultPath = 'scrm.api.carlife.'
...@@ -40,5 +40,15 @@ const uploadImg = params => { ...@@ -40,5 +40,15 @@ const uploadImg = params => {
noSignAttr: ['file'] noSignAttr: ['file']
}) })
} }
// 获取省市区信息
export default { getGoodsCategoryConfiguration, uploadImg, uploadVideo } const getAreaInfoApi = function (params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}yseMerchantOffline.getAreaInfo`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getAreaInfoApi, getGoodsCategoryConfiguration, uploadImg, uploadVideo }
$color-yellow:#fdb757; $color-yellow:#fdb757;
$color-green:#2cca74; $color-green:#2cca74;
$color-gray:#999; $color-gray:#999;
$color-red:#EB4E4E;
//背景图片 100% //背景图片 100%
@mixin bkgMaxSize($url) { @mixin bkgMaxSize($url) {
background-image: url($url); background-image: url($url);
......
...@@ -32,3 +32,6 @@ cursor: pointer; ...@@ -32,3 +32,6 @@ cursor: pointer;
background-size: 100% 100%; background-size: 100% 100%;
margin-right: 4px; margin-right: 4px;
} }
.el-cascader-menu__wrap{
height: 204px!important;
}
\ No newline at end of file \ No newline at end of file
import Vue from 'vue' import Vue from 'vue'
import { defaultStatusOptions, defaultDeliveryStatusOptions, defaultPutStatusOptions, tableData } from '@/utils/constants.js' import { defaultStatusOptions,putStatusOptions, defaultDeliveryStatusOptions, defaultPutStatusOptions, tableData } from '@/utils/constants.js'
// 发货状态 // 发货状态
Vue.filter('deliveryStatus', (id, formatString) => { Vue.filter('deliveryStatus', (id, formatString) => {
const text = '--' const text = '--'
...@@ -11,7 +11,7 @@ Vue.filter('deliveryStatus', (id, formatString) => { ...@@ -11,7 +11,7 @@ Vue.filter('deliveryStatus', (id, formatString) => {
return text return text
}) })
// 入库状态 // 入库状态
Vue.filter('putStatus', (id, formatString) => { Vue.filter('puStatus', (id, formatString) => {
const text = '--' const text = '--'
for (let i = 0; i < defaultPutStatusOptions.length; i++) { for (let i = 0; i < defaultPutStatusOptions.length; i++) {
if (defaultPutStatusOptions[i].id === id) { if (defaultPutStatusOptions[i].id === id) {
...@@ -20,6 +20,16 @@ Vue.filter('deliveryStatus', (id, formatString) => { ...@@ -20,6 +20,16 @@ Vue.filter('deliveryStatus', (id, formatString) => {
} }
return text return text
}) })
// 入库状态
Vue.filter('putOrderStatus', (id, formatString) => {
const text = '--'
for (let i = 0; i < putStatusOptions.length; i++) {
if (putStatusOptions[i].id === id) {
return putStatusOptions[i].label
}
}
return text
})
// 订单状态状态 // 订单状态状态
Vue.filter('orderStatus', (id, formatString) => { Vue.filter('orderStatus', (id, formatString) => {
......
...@@ -9,9 +9,9 @@ const staticRoutes = Object.freeze([{ ...@@ -9,9 +9,9 @@ const staticRoutes = Object.freeze([{
meta: {} meta: {}
}, },
{ {
name: 'deliver', name: 'DeliverList',
path: '/deliver/index', path: '/DeliverList/index',
component: resolve => require([`@/views/deliver/index.vue`], resolve), component: resolve => require([`@/views/DeliverList/index.vue`], resolve),
meta: {} meta: {}
} }
]) ])
......
...@@ -11,23 +11,43 @@ export const defaultStatusOptions = [ ...@@ -11,23 +11,43 @@ export const defaultStatusOptions = [
{ {
id: 3, id: 3,
label: "已取消" label: "已取消"
},
{
id: 4,
label: "已驳回"
} }
] ]
// 发货状态
// 发货状态 export const defaultDeliveryStatusOptions = [
export const defaultDeliveryStatusOptions = [
{ {
id: 1, id: 1,
label: "未发货" label: "未发货"
}, },
{ {
id: 3,
label: "部分发货"
},
{
id: 2, id: 2,
label: "已发货" label: "全部发货"
} }
] ]
// 入库状态 export const putStatusOptions = [
export const defaultPutStatusOptions = [ {
id: 1,
label: "未入库"
},
{
id: 3,
label: "部分入库"
}, {
id: 2,
label: "全部入库"
}
]
// 入库状态
export const defaultPutStatusOptions = [
{ {
id: 1, id: 1,
label: "未入库" label: "未入库"
...@@ -36,9 +56,9 @@ export const defaultStatusOptions = [ ...@@ -36,9 +56,9 @@ export const defaultStatusOptions = [
id: 2, id: 2,
label: "已入库" label: "已入库"
} }
] ]
//采购类型 //采购类型
export const purchaseTypeList=[ export const purchaseTypeList = [
{ {
id: 1, id: 1,
label: "商城采购" label: "商城采购"
...@@ -47,7 +67,6 @@ export const defaultStatusOptions = [ ...@@ -47,7 +67,6 @@ export const defaultStatusOptions = [
id: 2, id: 2,
label: "自采入库" label: "自采入库"
}, },
] ]
export const membraneTypeList = [1, 4, 6, 12, 14] export const membraneTypeList = [1, 4, 6, 12, 14]
<template>
<GLDialog v-if="dialogShow" bigTitle="详细信息" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false">
<div class="detail-info">
<div>
发货单号:
<span>{{ detailInfo.deliveryNumber }}</span>
</div>
<div>
承运公司:
<span>{{ detailInfo.deliveryCompany }}</span>
</div>
<div>
发货时间:
<span>{{ dayjs(detailInfo.deliveryDate).format('YYYY-MM-DD HH:mm:ss') }}</span>
</div>
</div>
<template v-for="(item, index) in detailInfo.deliveryDetailList">
<div class="table-wrap" :key="index">
<div class="detail-info">
<div>
商品名称:
<span>{{ item.upgradeGoodsName }}</span>
</div>
<div>
发货数量:
<span>{{ membraneTypeList.includes(item.goodsType) ? `${item.purchaseNumber}卷` : `${item.purchaseNumber}件` }}</span>
</div>
<div>
可用库存数量:
<span>{{ item.stockNum }}{{ membraneTypeList.includes(item.goodsType) ? `米` : `件` }}</span>
</div>
</div>
<el-form ref="addForm" :model="item" size="small">
<GLTable :tableData="item.goodsWarehousingList" :noDataImg="url" :tableParams="tableParams" :hasPage="false">
<template slot="increaseStockNum" slot-scope="scope">
<span>{{ membraneTypeList.includes(scope.scope.goodsType) ? `${scope.scope.increaseStockNum}米` : `${scope.scope.increaseStockNum}件` }}</span>
</template>
</GLTable>
</el-form>
</div>
</template>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogShow = false">关闭</el-button>
</span>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'DeliverAdd',
props: {
visible: {
type: Boolean,
default: false
},
id: {
type: String,
default: ''
}
},
computed: {
dialogShow: {
get() {
if (this.visible) {
this.getDetail()
}
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
data() {
return {
membraneTypeList: membraneTypeList,
dayjs: dayjs,
goodsList: [],
storeUsageList: [],
refByYqShopList: [],
tableParams: {
tableOption: false,
tableColumns: [
{
label: '入库数量',
prop: 'increaseStockNum',
addHtml: 'increaseStockNum'
},
{
label: '入库仓库',
prop: 'yqMerchantName'
},
{
label: '入库门店',
prop: 'merchantName'
}
]
},
detailInfo: {}
}
},
created() {},
methods: {
handleDetailClose() {
this.dialogShow = false
},
getDetail() {
this.$apis.delivery.getDeliveryDetail({ id: this.id }).then(res => {
if (res.code == 0) {
this.detailInfo = res.data
}
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-info {
display: flex;
align-items: center;
justify-content: space-between;
color: #666666ff;
font-size: 14px;
margin-bottom: 16px;
span {
color: #333333ff;
}
.add-btn {
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
}
.table-wrap {
border: 1px solid #e5e5e5;
padding: 16px;
box-sizing: border-box;
margin-top: 16px;
/deep/ .el-form-item__error {
padding-top: 2px;
z-index: 9999999;
position: static;
}
}
</style>
<!-- 专区管理 -->
<template>
<div class="marketing p-t-20">
<div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建</el-button>
</div>
<div class="container">
<el-form :inline="true">
<el-form-item label="专区名称">
<el-input style="width: 215px;" :size="size" v-model="searchForm.zoneName"></el-input>
</el-form-item>
<el-form-item class="search-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="default" @click="handleReset">查询</el-button>
</el-form-item>
</el-form>
<!-- 表格区域 开始 -->
<GLTable
ref="zoneRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'zoneList',
data() {
return {
size: 'small',
url: url,
searchForm: {
zoneName: '',
createDate: []
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '专区名称',
name: 'zoneName',
type: 'input',
maxlength: 20
},
{
label: '创建日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
// 表格
getListApi: this.$apis.zoneList.getZoneListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '专区名称',
prop: 'zoneName'
},
{
label: '创建日期',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
mounted() {},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
params.zoneType = '2' //专区类型(1发现频道,2商城专区)
if (this.searchForm.createDate.length) {
params.startTime = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endTime = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createDate
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
resolve()
})
},
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
this.$message({
type: 'success',
message: addOrEdit == '1' ? '新增' : '编辑'
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.zoneRef.data.length ? (this.$refs.zoneRef.tableHeightValues = '') : this.$refs.zoneRef.setTableHeightFun()
},
handleSearch() {
this.$refs.zoneRef.refreshTable()
},
handleReset() {
this.searchForm = {
zoneName: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped>
.marketing .search-btns {
float: right;
margin-right: 0;
}
</style>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</span> </span>
<span class="address"> <span class="address">
收货地址: 收货地址:
<span class="label">{{ $$(addressInfo, 'contactAddress') }}</span> <span class="label">{{ $$(addressInfo, 'provinceName') }}{{ $$(addressInfo, 'cityName') }}{{ $$(addressInfo, 'areaName') }}{{ $$(addressInfo, 'contactAddress') }}</span>
</span> </span>
</div> </div>
</div> </div>
...@@ -179,6 +179,7 @@ export default { ...@@ -179,6 +179,7 @@ export default {
.then(result => { .then(result => {
if (result) { if (result) {
this.addressInfo = result this.addressInfo = result
console.log( this.addressInfo)
} }
if (this.showOrderCom) { if (this.showOrderCom) {
......
<template> <template>
<el-drawer class="shoppingCartDrawerCon" title="收货地址管理" size="500px" :visible.sync="dialogShow" :direction="direction"> <el-drawer class="shoppingCartDrawerCon" title="收货地址管理" size="500px" :visible.sync="dialogShow" :direction="direction">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="100px" default-width="350px" <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">
:form-ref="editChildRef" :form-obj="editForm" :form-data="editFormData" :form-rules="editRule"></glsx-combi-form> <span slot="provincesAndCities">
<!-- 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' }" />
</span>
</glsx-combi-form>
<div class="footer-btn"> <div class="footer-btn">
<el-button @click="submit" type="primary">保存</el-button> <el-button @click="submit" type="primary">保存</el-button>
<el-button @click="dialogShow = false">取消</el-button> <el-button @click="dialogShow = false">取消</el-button>
</div> </div>
</el-drawer> </el-drawer>
</template> </template>
...@@ -53,28 +56,41 @@ export default { ...@@ -53,28 +56,41 @@ export default {
}, },
{ {
label: '收货地址', label: '收货地址',
name: 'provincesAndCities',
type: 'other',
addHtml: 'provincesAndCities'
},
{
label: '',
name: 'contactAddress', name: 'contactAddress',
type: 'input', type: 'input',
maxlength: 50, maxlength: 50,
placeholder: '请输入收货地址', placeholder: '请输入收货地址',
inputType: 'textarea' inputType: 'textarea',
rows: 3,
style: {
'padding-left': '104px'
}
// tips: '如XX店车主关怀活动' // tips: '如XX店车主关怀活动'
} }
], ],
editForm: { editForm: {
contactName: '', contactName: '',
contactPhone: '', contactPhone: '',
contactAddress: '' contactAddress: '',
provincesAndCities: []
}, },
provincesAndCities_options: [],
editRule: { editRule: {
contactName: [{ required: true, message: '请输入姓名', trigger: 'change' }], contactName: [{ required: true, message: '请输入姓名', trigger: 'change' }],
contactPhone: [{ required: true, message: '请输入电话号码', trigger: 'change' }, contactPhone: [
{ validator: checkPhone, trigger: 'blur' }], { required: true, message: '请输入电话号码', trigger: 'change' },
contactAddress: [{ required: true, message: '请输入收货地址', trigger: 'change' }] { validator: checkPhone, trigger: 'blur' }
],
contactAddress: [{ required: true, message: '请输入收货地址', trigger: 'change' }],
provincesAndCities: [{ required: true, message: '请选择省市区', trigger: 'change' }]
}, },
editChildRef: 'editChildRef' editChildRef: 'editChildRef'
} }
}, },
computed: { computed: {
...@@ -90,56 +106,79 @@ export default { ...@@ -90,56 +106,79 @@ export default {
watch: { watch: {
visible(val) { visible(val) {
if (val) { if (val) {
this.editForm = this.addressInfo ? this.$common.utils.deepClone(this.addressInfo) : {} this.getAreaInfo()
if (this.addressInfo) {
this.editForm = this.$common.utils.deepClone(this.addressInfo)
this.editForm.provincesAndCities = [String(this.editForm.provinceId), String(this.editForm.cityId), String(this.editForm.areaId)]
} else {
this.editForm = {}
}
} }
} }
}, },
created() {},
methods: { methods: {
handleDetailClose() { // 获取省市区信息
getAreaInfo() {
this.$apis.sysBase.getAreaInfoApi({ areaType: '2' }).then(res => {
this.provincesAndCities_options = res.areaList
})
}, },
handleOkFn() { getProvincesAndCities() {
// console.log('您点击了确定') const nodesInfo = this.$refs.cascader.getCheckedNodes()
},
handleRestFn() { if (nodesInfo.length == 0 || Object.prototype.toString.call(nodesInfo[0]) != '[object Object]') {
console.log('您点击了取消') return
}
this.editForm.provinceId = nodesInfo[0].pathNodes[0].value
this.editForm.provinceName = nodesInfo[0].pathNodes[0].label
this.editForm.cityId = nodesInfo[0].pathNodes[1].value
this.editForm.cityName = nodesInfo[0].pathNodes[1].label
this.editForm.areaId = nodesInfo[0].pathNodes[2].value
this.editForm.areaName = nodesInfo[0].pathNodes[2].label
}, },
submit() { submit() {
console.log(this.editForm.provincesAndCities)
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
this.getProvincesAndCities()
const params = this.$common.utils.deepClone(this.editForm) const params = this.$common.utils.deepClone(this.editForm)
this.$apis.purchaseShopping.addressSave(params).then((result) => { delete params.provincesAndCities
this.$apis.purchaseShopping
.addressSave(params)
.then(result => {
this.$notify({ this.$notify({
type: 'success', type: 'success',
title: '保存成功' title: '保存成功'
}) })
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;
::v-deep .el-drawer__header { /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 {
.el-textarea__inner {
height: auto !important;
}
}
.footer-btn { .footer-btn {
text-align: center; text-align: center;
} }
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<span class="num">{{ goodsInfo.purchaseOrderCount || 0 }}笔</span> <span class="num">{{ goodsInfo.purchaseOrderCount || 0 }}笔</span>
</span> </span>
</div> </div>
<div class="productCode">商品编码:{{goodsInfo.type}}</div>
<div class="skuCon"> <div class="skuCon">
<div class="label">规格:</div> <div class="label">规格:</div>
<div class="itemCon"> <div class="itemCon">
...@@ -46,7 +47,7 @@ ...@@ -46,7 +47,7 @@
</div> </div>
<!-- <i class="carIcon"></i> --> <!-- <i class="carIcon"></i> -->
</div> </div>
<div class="table-wrap" v-if="tableInfo.length"> <div class="table-wrap" v-if="tableInfo&&tableInfo.length">
<h3>适用门店</h3> <h3>适用门店</h3>
<GLTable :hasNum="false" :hasPage="false" :tableParams="tableParams" :table-data="tableInfo"></GLTable> <GLTable :hasNum="false" :hasPage="false" :tableParams="tableParams" :table-data="tableInfo"></GLTable>
</div> </div>
...@@ -150,8 +151,7 @@ export default { ...@@ -150,8 +151,7 @@ export default {
getGoodsDetail() { getGoodsDetail() {
this.$apis.product.getProductInfo({ id: this.goodsId }).then(res => { this.$apis.product.getProductInfo({ id: this.goodsId }).then(res => {
this.goodsInfo = res this.goodsInfo = res
this.tableInfo = res.upgradeGoodsList.filter(item => item.upgradeGoodsAlias) this.tableInfo = res.upgradeGoodsList.merchantGoodsInfoList
// 调试用
// for (let index = 0; index < 12; index++) { // for (let index = 0; index < 12; index++) {
// this.goodsInfo.upgradeGoodsList[index] = this.goodsInfo.upgradeGoodsList[0] // this.goodsInfo.upgradeGoodsList[index] = this.goodsInfo.upgradeGoodsList[0]
// } // }
...@@ -329,4 +329,11 @@ export default { ...@@ -329,4 +329,11 @@ export default {
margin-bottom: 16px; margin-bottom: 16px;
} }
} }
.productCode{
font-weight: 400;
font-size: 14px;
color: #666666;
margin-bottom:16px;
padding-left: 18px;
}
</style> </style>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<img src="@/images/addressIcon.webp" alt="" class="icon" /> <img src="@/images/addressIcon.webp" alt="" class="icon" />
<span class="title">{{ paramsObj.merchantName }}</span> <span class="title">{{ paramsObj.merchantName }}</span>
</div> </div>
<div class="address-info" v-if="paramsObj.purchaseType==1"> <div class="address-info" v-if="paramsObj.purchaseType == 1">
<span class="name"> <span class="name">
收货人: 收货人:
<span class="label">{{ detailInfo.contactName }}</span> <span class="label">{{ detailInfo.contactName }}</span>
...@@ -16,7 +16,11 @@ ...@@ -16,7 +16,11 @@
</span> </span>
<span class="address"> <span class="address">
收货地址: 收货地址:
<span class="label">{{ detailInfo.contactAddress }}</span> <span class="label">{{ detailInfo.provinceName }}{{ detailInfo.cityName }}{{ detailInfo.areaName }}{{ detailInfo.contactAddress }}</span>
</span>
<span class="address" v-if="detailInfo.rejectCause">
驳回原因:
<span class="label">{{ detailInfo.rejectCause }}</span>
</span> </span>
</div> </div>
<div class="table-class"> <div class="table-class">
...@@ -47,6 +51,7 @@ export default { ...@@ -47,6 +51,7 @@ export default {
dialogShow: { dialogShow: {
get() { get() {
if (this.visible) { if (this.visible) {
this.getDetail({ currentPage: 1, pageSize: 20 }) this.getDetail({ currentPage: 1, pageSize: 20 })
} }
return this.visible return this.visible
...@@ -65,43 +70,96 @@ export default { ...@@ -65,43 +70,96 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商品名称', label: '商品名称',
prop: 'upgradeGoodsName' prop: 'upgradeGoodsName',
width: 120,
line: 1
}, },
{ {
label: '商品编码', label: '商品编码',
prop: 'type' prop: 'type',
width: 100
}, },
{ {
label: '系列', label: '系列',
prop: 'goodsName' prop: 'goodsName',
width: 100,
line: 1
}, },
{ {
label: '所属分类', label: '所属分类',
prop: 'goodsTypeName' prop: 'goodsTypeName',
width: 100
}, },
{ {
label: '采购数量', label: '采购数量',
prop: 'goodsNumber', prop: 'goodsNumber',
formatter: cellValue => { formatter: cellValue => {
let condition= membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷/${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件` let condition = membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType==1?condition:`${cellValue.goodsNumber}件` return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件`
} },
width: 100
},
{
label: '库存总量',
prop: 'goodsTypeName',
formatter: cellValue => {
let condition = membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件`
},
width: 100
}, },
{ {
label: '采购总价/元', label: '采购总价/元',
prop: 'goodsTotalPrice', prop: 'goodsTotalPrice',
formatter: cellValue => { formatter: cellValue => {
return '¥' + cellValue.goodsTotalPrice return '¥' + cellValue.goodsTotalPrice
} },
width: 120
} }
] ]
}, },
detailInfo: {} detailInfo: {}
} }
}, },
created() {
this.dynamicParams()
},
methods: { methods: {
dynamicParams() {
if (this.paramsObj.purchaseType == 1) {
this.tableParams.tableColumns.push(
{
label: '已发货数量',
prop: 'purchaseNumber',
width: 110,
line: 1
},
{
label: '已入库数量',
prop: 'inputNumber',
width: 110,
line: 1
}
)
} else {
this.tableParams.tableColumns.push(
{
label: '入库仓库',
prop: 'putYqMerchantName',
width: 100,
line: 1
},
{
label: '入库门店',
prop: 'putMerchantName',
width: 100,
line: 1
}
)
}
},
handleDetailClose() { handleDetailClose() {
this.dialogShow = false this.dialogShow = false
}, },
...@@ -111,6 +169,7 @@ export default { ...@@ -111,6 +169,7 @@ export default {
getDetail(pageObj) { getDetail(pageObj) {
this.$apis.purchaseShopping.purchaseOrderDetail({ orderCode: this.paramsObj.orderCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then(res => { this.$apis.purchaseShopping.purchaseOrderDetail({ orderCode: this.paramsObj.orderCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then(res => {
this.detailInfo = res this.detailInfo = res
console.log(this.detailInfo)
this.detailInfo.tableData = res.pagination.list this.detailInfo.tableData = res.pagination.list
this.detailInfo.tableTotal = res.pagination.total this.detailInfo.tableTotal = res.pagination.total
}) })
......
...@@ -71,7 +71,8 @@ ...@@ -71,7 +71,8 @@
<ul class="orderInfoCom"> <ul class="orderInfoCom">
<li class="item" v-for="(item, index) in addressInfoList" :key="index"> <li class="item" v-for="(item, index) in addressInfoList" :key="index">
<span class="label">{{ item.label }}</span> <span class="label">{{ item.label }}</span>
<span class="conten">{{ $$(addressInfo, [item.name]) }}</span> <span class="conten" v-if="item.name == 'contactAddress'">{{ $$(addressInfo, 'provinceName') }}{{ $$(addressInfo, 'cityName') }}{{ $$(addressInfo, 'areaName') }}{{ $$(addressInfo, 'contactAddress') }}</span>
<span class="conten" v-else>{{ $$(addressInfo, [item.name]) }}</span>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -186,17 +187,25 @@ export default { ...@@ -186,17 +187,25 @@ export default {
}, },
handleSubmit() { handleSubmit() {
if (this.throttleSubmit) return if (this.throttleSubmit) return
console.log(this.throttleSubmit) const { contactAddress, contactName, contactPhone, provinceId, provinceName, cityId, cityName, areaId, areaName } = this.addressInfo
console.log('submit')
const { contactAddress, contactName, contactPhone } = this.addressInfo
const params = { const params = {
orderDelivery: {
contactAddress, contactAddress,
contactName, contactName,
contactPhone contactPhone,
}, provinceId,
provinceName,
cityId,
cityName,
areaId,
areaName,
shoppingCarList: this.selectList shoppingCarList: this.selectList
} }
if (provinceName === null) {
this.dialogShow = false
this.drawer = false
this.$message.error('请完善收货地址')
return
}
this.throttleSubmit = true this.throttleSubmit = true
this.$apis.purchaseShopping.purchaseOrderAdd(params).then(result => { this.$apis.purchaseShopping.purchaseOrderAdd(params).then(result => {
this.drawer = false this.drawer = false
...@@ -214,7 +223,6 @@ export default { ...@@ -214,7 +223,6 @@ export default {
// } // }
}, },
handleDelete(upgradeGoodsId) { handleDelete(upgradeGoodsId) {
// console.log(upgradeGoodsId)
this.$apis.purchaseShopping.shoppingCarRemove({ id: upgradeGoodsId }).then(result => { this.$apis.purchaseShopping.shoppingCarRemove({ id: upgradeGoodsId }).then(result => {
this.getGoodsList() this.getGoodsList()
}) })
...@@ -426,7 +434,8 @@ li { ...@@ -426,7 +434,8 @@ li {
.car-txt { .car-txt {
font-size: 14px; font-size: 14px;
color: #ffffff; color: #ffffff;
writing-mode:vertical-rl; writing-mode: vertical-rl;
cursor: pointer;
} }
&::after { &::after {
// content: "123"; // content: "123";
...@@ -582,14 +591,14 @@ li { ...@@ -582,14 +591,14 @@ li {
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
color: #f8ba37; color: #f8ba37;
margin:20px 0 40px 0; margin: 20px 0 40px 0;
} }
.tips { .tips {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
span{ span {
margin-bottom:20px; margin-bottom: 20px;
} }
} }
......
...@@ -29,7 +29,22 @@ ...@@ -29,7 +29,22 @@
<el-input v-model="scope.scope.goodsTotalPrice" placeholder="请输入" @blur="handleCalculate(scope.scope, 'goodsTotalPrice')"></el-input> <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">
<el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.putYqMerchantId'" :rules="rules.putYqMerchantId">
<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-form-item>
</template>
<!-- 入库门店 -->
<template slot="putMerchantId" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.putMerchantId'" :rules="rules.putMerchantId">
<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-form-item>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDelete(scope.index)">删除</el-button> <el-button type="text" @click="handleDelete(scope.index)">删除</el-button>
</div> </div>
...@@ -74,10 +89,12 @@ export default { ...@@ -74,10 +89,12 @@ export default {
upgradePurchasePrice: [ upgradePurchasePrice: [
{ required: true, message: '请输入采购单价', trigger: 'blur' }, { required: true, message: '请输入采购单价', trigger: 'blur' },
{ validator: checkPrice, trigger: 'blur' } { validator: checkPrice, trigger: 'blur' }
] ],
putYqMerchantId: [{ required: true, message: '请选择入库仓库', trigger: 'change' }],
putMerchantId: [{ required: true, message: '请选择入库门店', trigger: 'change' }]
}, },
formdata: { formdata: {
tableData: [{ upgradeGoodsId: '', type: '', goodsName: '', goodsNumber: '', upgradePurchasePrice: '', goodsTotalPrice: '' }] tableData: [{ upgradeGoodsId: '', type: '', goodsName: '', goodsNumber: '', upgradePurchasePrice: '', goodsTotalPrice: '', putYqMerchantId: '', putYqMerchantName: '', putMerchantId: '', putMerchantName: '' , refByYqShopList: []}]
}, },
tableParams: { tableParams: {
tableOption: true, tableOption: true,
...@@ -109,17 +126,58 @@ export default { ...@@ -109,17 +126,58 @@ export default {
label: '采购总额/元', label: '采购总额/元',
prop: 'goodsTotalPrice', prop: 'goodsTotalPrice',
addHtml: 'goodsTotalPrice' addHtml: 'goodsTotalPrice'
},
{
label: '入库仓库',
prop: 'putYqMerchantId',
addHtml: 'putYqMerchantId'
},
{
label: '入库门店',
prop: 'putMerchantId',
addHtml: 'putMerchantId'
} }
] ]
}, },
goodsList: [] goodsList: [],
storeUsageList: [],
refByYqShopList: []
} }
}, },
created() { created() {
this.getfwsGoodsList() this.getfwsGoodsList()
this.getMerchantList()
if (this.orderCode) this.getData() if (this.orderCode) this.getData()
}, },
methods: { methods: {
getMerchantList() {
this.$apis.purchaseShopping.getMerchantList({ mainPartnerMerchant: true }).then(res => {
this.storeUsageList = res
if (this.storeUsageList.length == 1) this.defaultSelect()
})
},
defaultSelect() {
let {
formdata: { tableData },
storeUsageList
} = this
tableData.forEach(item => {
item.putYqMerchantName = storeUsageList[0].merchantName
item.putYqMerchantId = storeUsageList[0].merchantNo
})
this.getRefByYqShopList(tableData[0], storeUsageList[0].merchantNo)
},
getRefByYqShopList(data, value) {
this.$apis.purchaseShopping.get4SRefByYqShopList({ scene: 1, merchantId: value }).then(res => {
data.refByYqShopList = res
if (data) {
data.refByYqShopList.unshift({
merchantName: data.putYqMerchantName,
merchantId: Number(data.putYqMerchantId)
})
}
})
},
handleSave(saveOrWarehousing) { handleSave(saveOrWarehousing) {
this.$refs['addForm'].validate(valid => { this.$refs['addForm'].validate(valid => {
if (valid) { if (valid) {
...@@ -130,7 +188,11 @@ export default { ...@@ -130,7 +188,11 @@ export default {
goodsName: item.goodsName, goodsName: item.goodsName,
goodsNumber: item.goodsNumber, goodsNumber: item.goodsNumber,
upgradePurchasePrice: item.upgradePurchasePrice, upgradePurchasePrice: item.upgradePurchasePrice,
goodsTotalPrice: item.goodsTotalPrice goodsTotalPrice: item.goodsTotalPrice,
putYqMerchantId: item.putYqMerchantId,
putYqMerchantName: item.putYqMerchantName,
putMerchantId: item.putMerchantId,
putMerchantName: item.putMerchantName
}) })
}) })
let params = { let params = {
...@@ -166,9 +228,16 @@ export default { ...@@ -166,9 +228,16 @@ export default {
}, },
getData() { getData() {
this.$apis.purchaseShopping.selectByOrderCode({ orderCode: this.orderCode }).then(res => { this.$apis.purchaseShopping.selectByOrderCode({ orderCode: this.orderCode }).then(res => {
res.forEach(item => {
item.putYqMerchantId = String(item.putYqMerchantId)
item.putMerchantId = item.putMerchantId
item.refByYqShopList = []
this.getRefByYqShopList(item, item.putYqMerchantId)
})
this.$nextTick(() => {
this.formdata.tableData = res this.formdata.tableData = res
}) })
})
}, },
handleDelete(index) { handleDelete(index) {
if (this.formdata.tableData.length == 1) return if (this.formdata.tableData.length == 1) return
...@@ -187,44 +256,80 @@ export default { ...@@ -187,44 +256,80 @@ export default {
} }
}) })
}, },
handleCalculate(data, key) {
handleSelect(data, id) {
this.storeUsageList.forEach(item => {
if (item.merchantNo == id) {
data.putYqMerchantName = item.merchantName
data.putMerchantId = ''
}
})
this.getRefByYqShopList(data, id)
},
handleStoreSelect(data, id) {
this.refByYqShopList.forEach(item => {
if (item.merchantId == id) {
data.putMerchantName = item.merchantName
}
})
},
handleCalculate(data, key) {
if (key == 'goodsNumber') { if (key == 'goodsNumber') {
data[key] = data[key]?new BigNumber(data[key]).dp(0).toNumber():'' data[key] = data[key] ? new BigNumber(data[key]).dp(0).toNumber() : ''
data.goodsTotalPrice = data.upgradePurchasePrice&&data.goodsNumber?new BigNumber(data.upgradePurchasePrice) data.goodsTotalPrice =
data.upgradePurchasePrice && data.goodsNumber
? new BigNumber(data.upgradePurchasePrice)
.times(data.goodsNumber) .times(data.goodsNumber)
.dp(2) .dp(2)
.toNumber():'' .toNumber()
: ''
return return
} }
if (!data.goodsNumber) return if (!data.goodsNumber) return
data[key] = data[key]?new BigNumber(data[key]).dp(2).toNumber():'' data[key] = data[key] ? new BigNumber(data[key]).dp(2).toNumber() : ''
let params = { let params = {
upgradePurchasePrice: data => { upgradePurchasePrice: data => {
data.goodsTotalPrice = data.upgradePurchasePrice?new BigNumber(data.upgradePurchasePrice) data.goodsTotalPrice = data.upgradePurchasePrice
? new BigNumber(data.upgradePurchasePrice)
.times(data.goodsNumber) .times(data.goodsNumber)
.dp(2) .dp(2)
.toNumber():'' .toNumber()
: ''
}, },
goodsTotalPrice: data => { goodsTotalPrice: data => {
data.upgradePurchasePrice = data.goodsTotalPrice?new BigNumber(data.goodsTotalPrice) data.upgradePurchasePrice = data.goodsTotalPrice
? new BigNumber(data.goodsTotalPrice)
.div(data.goodsNumber) .div(data.goodsNumber)
.dp(2) .dp(2)
.toNumber():'' .toNumber()
: ''
} }
} }
params[key](data) params[key](data)
}, },
addLine() { addLine() {
this.formdata.tableData.unshift({ let {
storeUsageList,
formdata: { tableData }
} = this
tableData.unshift({
refByYqShopList: [],
upgradeGoodsId: '', upgradeGoodsId: '',
type: '', type: '',
goodsName: '', goodsName: '',
goodsNumber: '', goodsNumber: '',
upgradePurchasePrice: '', upgradePurchasePrice: '',
goodsTotalPrice: '' goodsTotalPrice: '',
putYqMerchantId: storeUsageList.length == 1 ? storeUsageList[0].merchantNo : '',
putYqMerchantName: storeUsageList.length == 1 ? storeUsageList[0].merchantName : '',
putMerchantId: '',
putMerchantName: ''
}) })
if (storeUsageList.length == 1) {
this.getRefByYqShopList(tableData[0], tableData[0].putYqMerchantId)
}
}, },
goBack() { goBack() {
this.$router.go(-1) this.$router.go(-1)
...@@ -255,6 +360,6 @@ export default { ...@@ -255,6 +360,6 @@ export default {
} }
/deep/ td.el-table__cell { /deep/ td.el-table__cell {
height: 64px; height: 64px;
} }
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!