Commit 6ce32353 by 王志慧

commit

1 parent 136f36fc
......@@ -60,4 +60,7 @@ const addSelfOrder = (params) => {
sign: true
})
}
export default { addSelfOrder,getGoodsList,getProductInfo, getProductTypeBySceneId ,getfwsGoodsList}
......@@ -199,7 +199,17 @@ export function getMerchantList(params) {
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) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
......@@ -219,4 +229,4 @@ export function selectByOrderCode(params) {
// 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
export default {get4SRefByYqShopList, selectByOrderCode,purchaseOrderDelete, getMerchantList, purchaseOrderPutIn, exportExcel, shoppingCarUpdateNumber, purchaseOrderAdd, shoppingCarAdd, shoppingCarRemove, updateSelectedFlag, listGroupByGoodsType, getPurchaseOrderList, purchaseOrderCancelOrCheck, purchaseOrderDetail, listWithPagePurchaseInfo, addressGet, addressSave }
\ No newline at end of file
......@@ -42,13 +42,13 @@ const uploadImg = params => {
}
// 获取省市区信息
const getAreaInfoApi = function (params) {
params.method = `${path}yseMerchantOffline.getAreaInfo`
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}yseMerchantOffline.getAreaInfo`
return http({
url: 'rop-scrm-smartcarlife/router',
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getAreaInfoApi, getGoodsCategoryConfiguration, uploadImg, uploadVideo }
......@@ -31,4 +31,11 @@ cursor: pointer;
background: url(../../images/shoppingCarIcon.webp) no-repeat;
background-size: 100% 100%;
margin-right: 4px;
}
\ No newline at end of file
}
// .el-popper{
// height:250px;
// top: 220px !important;;
// }
// .el-cascader-panel{
// height:250px;
// }
\ No newline at end of file
......@@ -34,23 +34,25 @@
</div>
</div>
<el-form ref="addForm" :model="item" size="small" :rules="rules">
<GLTable ref="orderRef" :tableData="item.goodsWareHousingList" :noDataImg="url" :tableParams="tableParams" :hasPage="false">
<GLTable :tableData="item.goodsWareHousingList" :noDataImg="url" :tableParams="tableParams" :hasPage="false">
<template slot="increaseStockNum" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'goodsWareHousingList.' + scope.index + '.increaseStockNum'" :rules="rules.increaseStockNum">
<el-input v-model="scope.scope.increaseStockNum" placeholder="请输入" @input="handleCalculate(scope.scope, 'increaseStockNum')"></el-input>
</el-form-item>
</template>
<template slot="shopMerchantName" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'goodsWareHousingList.' + scope.index + '.shopMerchantName'" :rules="rules.shopMerchantName">
<el-select style="width: 100%" v-model="scope.scope.shopMerchantName" placeholder="请选择" @change="handleSelect(scope.scope, scope.scope.shopMerchantName)">
<el-option v-for="item in goodsList" :key="item.shopMerchantName" :label="item.goodsName" :value="item.shopMerchantName"></el-option>
<!-- 入库仓库 -->
<template slot="yqMerchantId" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'goodsWareHousingList.' + scope.index + '.yqMerchantId'" :rules="rules.shopMerchantName">
<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-form-item>
</template>
<template slot="yqMerchantName" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'goodsWareHousingList.' + scope.index + '.yqMerchantName'" :rules="rules.yqMerchantName">
<el-select style="width: 100%" v-model="scope.scope.yqMerchantName" placeholder="请选择" @change="handleSelect(scope.scope, scope.scope.yqMerchantName)">
<el-option v-for="item in goodsList" :key="item.yqMerchantName" :label="item.goodsName" :value="item.yqMerchantName"></el-option>
<!-- 入库门店 -->
<template slot="merchantId" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'goodsWareHousingList.' + scope.index + '.merchantId'" :rules="rules.merchantId">
<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-form-item>
</template>
......@@ -98,6 +100,8 @@ export default {
data() {
return {
goodsList: [],
storeUsageList: [],
refByYqShopList: [],
tableParams: {
tableOption: true,
tableColumns: [
......@@ -108,19 +112,19 @@ export default {
},
{
label: '入库仓库',
prop: 'shopMerchantName',
addHtml: 'shopMerchantName'
prop: 'yqMerchantId',
addHtml: 'yqMerchantId'
},
{
label: '入库门店',
prop: 'yqMerchantName',
addHtml: 'yqMerchantName'
prop: 'merchantId',
addHtml: 'merchantId'
}
]
},
rules: {
shopMerchantName: [{ required: true, message: '请选择入库仓库', trigger: 'change' }],
yqMerchantName: [{ required: true, message: '请选择入库门店', trigger: 'change' }],
yqMerchantId: [{ required: true, message: '请选择入库仓库', trigger: 'change' }],
merchantId: [{ required: true, message: '请选择入库门店', trigger: 'change' }],
increaseStockNum: [
{ required: true, message: '请输入入库数量', trigger: 'blur' }
// { validator: checkPrice, trigger: 'blur' }
......@@ -130,82 +134,68 @@ export default {
}
},
created() {
this.getfwsGoodsList()
this.getMerchantList()
},
methods: {
handleSelect(data) {},
getfwsGoodsList() {
this.$apis.product.getfwsGoodsList({}).then(res => {
this.goodsList = res
handleCalculate(){},
getMerchantList() {
this.$apis.purchaseShopping.getMerchantList({}).then(res => {
this.storeUsageList = res
})
},
getRefByYqShopList(value) {
this.$apis.purchaseShopping.get4SRefByYqShopList({ scene: 1, merchantId: value }).then(res => {
this.refByYqShopList = res
})
},
handleSelect(data, id) {
this.storeUsageList.forEach(item => {
if (item.merchantNo == id) {
data.yqMerchantName = item.merchantName
data.merchantId = ''
}
})
this.getRefByYqShopList(id)
},
handleStoreSelect(data, id) {
this.refByYqShopList.forEach(item => {
if (item.merchantId == id) {
data.merchantName = item.merchantName
}
})
},
handleDetailClose() {
this.dialogShow = false
},
getDetail() {
this.detailInfo = {
deliveryDate: '2023/04/21 14:00',
deliveryCompany: '顺丰速运',
deliveryNumber: 4435323513,
deliveryDetailList: [
{
stockNum: 2,
purchaseNumber: 10,
upgradeGoodsName: '商品名称',
goodsWareHousingList: [
{
increaseStockNum: '',
yqMerchantName: '',
yqMerchantId: '',
shopMerchantName: '',
shopMerchantId: ''
},
{
increaseStockNum: '',
yqMerchantName: '',
yqMerchantId: '',
shopMerchantName: '',
shopMerchantId: ''
}
]
},
{
stockNum: 2,
purchaseNumber: 10,
upgradeGoodsName: '商品名称',
goodsWareHousingList: [
{
increaseStockNum: '',
yqMerchantName: '',
yqMerchantId: '',
shopMerchantName: '',
shopMerchantId: ''
}
]
}
]
}
this.$apis.delivery.getDeliveryDetail({ id: this.id }).then(res => {
console.log(res)
// this.detailInfo = res
if (res.code == 0) {
this.detailInfo = res.data
}
})
},
handleDelete(index, line) {
this.detailInfo.deliveryDetailList[index].goodsWareHousingList.splice(line, 1)
},
addLineTable(index) {
this.detailInfo.deliveryDetailList[index].goodsWareHousingList.unshift({
if (!this.detailInfo.deliveryDetailList[index].goodsWareHousingList) {
this.detailInfo.deliveryDetailList[index].goodsWareHousingList = []
}
this.detailInfo.deliveryDetailList[index].goodsWareHousingList.push({
increaseStockNum: '',
yqMerchantName: '',
yqMerchantId: '',
shopMerchantName: '',
shopMerchantId: ''
yqMerchantName: '',
merchantId: '',
merchantName: ''
})
let data = this.detailInfo.deliveryDetailList
this.$set(data, index, data[index])
},
handleSave() {
this.$refs['addForm'].validate(valid => {
console.log( this.$refs['addForm'])
this.$refs['addForm'].forEachvalidate(valid => {
if (valid) {
let purchaseOrderGoodsList = []
// this.formdata.tableData.forEach(item => {
// purchaseOrderGoodsList.push({
// upgradeGoodsId: item.upgradeGoodsId,
......@@ -215,18 +205,18 @@ export default {
// goodsTotalPrice: item.goodsTotalPrice
// })
// })
// let params = {
// saveOrWarehousing,
// purchaseOrderGoodsList
// }
// if (this.id) params.id = this.id
// this.$apis.product.addSelfOrder(params).then(res => {
// this.$notify({
// type: 'success',
// title: '操作成功'
// })
// this.goBack()
// })
let params = {
deliveryDetailList:this.detailInfo.deliveryDetailList,
id:this.id
}
params.id = this.id
this.$apis.delivery.addPurchaseOrder(params).then(res => {
this.$notify({
type: 'success',
title: '操作成功'
})
this.goBack()
})
}
})
}
......
......@@ -55,13 +55,10 @@ export default {
placeholder: '请输入电话号码'
},
{
label: '',
label: '收货地址',
name: 'provincesAndCities',
type: 'other',
addHtml: 'provincesAndCities',
style: {
'padding-left': '104px'
}
addHtml: 'provincesAndCities'
},
{
label: '',
......@@ -109,16 +106,18 @@ export default {
watch: {
visible(val) {
if (val) {
console.log(this.addressInfo)
if (this.addressInfo) {
this.editForm = this.$common.utils.deepClone(this.addressInfo)
this.editForm.provincesAndCities = [this.addressInfo.provinceId, this.addressInfo.cityId, this.addressInfo.countyId]
// this.editForm.provincesAndCities = [this.addressInfo.provinceId, this.addressInfo.cityId, this.addressInfo.countyId]
} else {
this.editForm = {}
}
}
}
},
created(){
this.getAreaInfo()
},
methods: {
// 获取省市区信息
getAreaInfo() {
......@@ -126,12 +125,6 @@ export default {
this.provincesAndCities_options = res.areaList
})
},
handleOkFn() {
// console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
},
submit() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
......@@ -173,5 +166,7 @@ export default {
.footer-btn {
text-align: center;
}
}
</style>
......@@ -20,6 +20,7 @@
<span class="num">{{ goodsInfo.purchaseOrderCount || 0 }}笔</span>
</span>
</div>
<div class="productCode">商品编码:465365684631436</div>
<div class="skuCon">
<div class="label">规格:</div>
<div class="itemCon">
......@@ -329,4 +330,10 @@ export default {
margin-bottom: 16px;
}
}
.productCode{
font-weight: 400;
font-size: 14px;
color: #666666;
margin-bottom:16px;
}
</style>
......@@ -29,7 +29,22 @@
<el-input v-model="scope.scope.goodsTotalPrice" placeholder="请输入" @blur="handleCalculate(scope.scope, 'goodsTotalPrice')"></el-input>
</el-form-item>
</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="getMerchantName(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="getMerchantName(scope.scope, scope.scope.putMerchantId)">
<el-option v-for="item in refByYqShopList" :key="item.upgradeGoodsId" :label="item.merchantName" :value="item.upgradeGoodsId"></el-option>
</el-select>
</el-form-item>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDelete(scope.index)">删除</el-button>
</div>
......@@ -74,10 +89,12 @@ export default {
upgradePurchasePrice: [
{ required: true, message: '请输入采购单价', trigger: 'blur' },
{ validator: checkPrice, trigger: 'blur' }
]
],
putYqMerchantId: [{ required: true, message: '请选择入库仓库', trigger: 'change' }],
putMerchantId: [{ required: true, message: '请选择入库门店', trigger: 'change' }]
},
formdata: {
tableData: [{ upgradeGoodsId: '', type: '', goodsName: '', goodsNumber: '', upgradePurchasePrice: '', goodsTotalPrice: '' }]
tableData: [{ upgradeGoodsId: '', type: '', goodsName: '', goodsNumber: '', upgradePurchasePrice: '', goodsTotalPrice: '', putYqMerchantId: '', putYqMerchantName: '', putMerchantId: '', putMerchantName: '' }]
},
tableParams: {
tableOption: true,
......@@ -109,17 +126,35 @@ export default {
label: '采购总额/元',
prop: 'goodsTotalPrice',
addHtml: 'goodsTotalPrice'
},
{
label: '入库仓库',
prop: 'putYqMerchantId',
addHtml: 'putYqMerchantId'
},
{
label: '入库门店',
prop: 'putMerchantId',
addHtml: 'putMerchantId'
}
]
},
goodsList: []
goodsList: [],
storeUsageList: [],
refByYqShopList: []
}
},
created() {
this.getfwsGoodsList()
this.getMerchantList()
if (this.orderCode) this.getData()
},
methods: {
getMerchantList() {
this.$apis.purchaseShopping.getMerchantList({}).then(res => {
this.storeUsageList = res
})
},
handleSave(saveOrWarehousing) {
this.$refs['addForm'].validate(valid => {
if (valid) {
......@@ -130,7 +165,11 @@ export default {
goodsName: item.goodsName,
goodsNumber: item.goodsNumber,
upgradePurchasePrice: item.upgradePurchasePrice,
goodsTotalPrice: item.goodsTotalPrice
goodsTotalPrice: item.goodsTotalPrice,
putYqMerchantId:item.putYqMerchantId,
putYqMerchantName:item.putYqMerchantName,
putMerchantId:item.putMerchantId,
putMerchantName:item.putMerchantName
})
})
let params = {
......@@ -166,7 +205,6 @@ export default {
},
getData() {
this.$apis.purchaseShopping.selectByOrderCode({ orderCode: this.orderCode }).then(res => {
this.formdata.tableData = res
})
},
......@@ -187,31 +225,38 @@ export default {
}
})
},
getMerchantName(data, id) {},
handleCalculate(data, key) {
if (key == 'goodsNumber') {
data[key] = data[key]?new BigNumber(data[key]).dp(0).toNumber():''
data.goodsTotalPrice = data.upgradePurchasePrice&&data.goodsNumber?new BigNumber(data.upgradePurchasePrice)
.times(data.goodsNumber)
.dp(2)
.toNumber():''
data[key] = data[key] ? new BigNumber(data[key]).dp(0).toNumber() : ''
data.goodsTotalPrice =
data.upgradePurchasePrice && data.goodsNumber
? new BigNumber(data.upgradePurchasePrice)
.times(data.goodsNumber)
.dp(2)
.toNumber()
: ''
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 = {
upgradePurchasePrice: data => {
data.goodsTotalPrice = data.upgradePurchasePrice?new BigNumber(data.upgradePurchasePrice)
.times(data.goodsNumber)
.dp(2)
.toNumber():''
data.goodsTotalPrice = data.upgradePurchasePrice
? new BigNumber(data.upgradePurchasePrice)
.times(data.goodsNumber)
.dp(2)
.toNumber()
: ''
},
goodsTotalPrice: data => {
data.upgradePurchasePrice = data.goodsTotalPrice?new BigNumber(data.goodsTotalPrice)
.div(data.goodsNumber)
.dp(2)
.toNumber():''
data.upgradePurchasePrice = data.goodsTotalPrice
? new BigNumber(data.goodsTotalPrice)
.div(data.goodsNumber)
.dp(2)
.toNumber()
: ''
}
}
params[key](data)
......@@ -255,6 +300,6 @@ export default {
}
/deep/ td.el-table__cell {
height: 64px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!