Commit 6ce32353 by 王志慧

commit

1 parent 136f36fc
...@@ -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`
...@@ -219,4 +229,4 @@ export function selectByOrderCode(params) { ...@@ -219,4 +229,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 {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
...@@ -42,13 +42,13 @@ const uploadImg = params => { ...@@ -42,13 +42,13 @@ const uploadImg = params => {
} }
// 获取省市区信息 // 获取省市区信息
const getAreaInfoApi = function (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({ return http({
url: 'rop-scrm-smartcarlife/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
export default { getAreaInfoApi, getGoodsCategoryConfiguration, uploadImg, uploadVideo } export default { getAreaInfoApi, getGoodsCategoryConfiguration, uploadImg, uploadVideo }
...@@ -32,3 +32,10 @@ cursor: pointer; ...@@ -32,3 +32,10 @@ cursor: pointer;
background-size: 100% 100%; background-size: 100% 100%;
margin-right: 4px; margin-right: 4px;
} }
// .el-popper{
// height:250px;
// top: 220px !important;;
// }
// .el-cascader-panel{
// height:250px;
// }
\ No newline at end of file \ No newline at end of file
...@@ -34,23 +34,25 @@ ...@@ -34,23 +34,25 @@
</div> </div>
</div> </div>
<el-form ref="addForm" :model="item" size="small" :rules="rules"> <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"> <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" :prop="'goodsWareHousingList.' + scope.index + '.increaseStockNum'" :rules="rules.increaseStockNum">
<el-input v-model="scope.scope.increaseStockNum" placeholder="请输入" @input="handleCalculate(scope.scope, 'increaseStockNum')"></el-input> <el-input v-model="scope.scope.increaseStockNum" placeholder="请输入" @input="handleCalculate(scope.scope, 'increaseStockNum')"></el-input>
</el-form-item> </el-form-item>
</template> </template>
<template slot="shopMerchantName" slot-scope="scope"> <!-- 入库仓库 -->
<el-form-item style="margin-bottom: 0px" :prop="'goodsWareHousingList.' + scope.index + '.shopMerchantName'" :rules="rules.shopMerchantName"> <template slot="yqMerchantId" slot-scope="scope">
<el-select style="width: 100%" v-model="scope.scope.shopMerchantName" placeholder="请选择" @change="handleSelect(scope.scope, scope.scope.shopMerchantName)"> <el-form-item style="margin-bottom: 0px" :prop="'goodsWareHousingList.' + scope.index + '.yqMerchantId'" :rules="rules.shopMerchantName">
<el-option v-for="item in goodsList" :key="item.shopMerchantName" :label="item.goodsName" :value="item.shopMerchantName"></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="yqMerchantName" slot-scope="scope"> <!-- 入库门店 -->
<el-form-item style="margin-bottom: 0px" :prop="'goodsWareHousingList.' + scope.index + '.yqMerchantName'" :rules="rules.yqMerchantName"> <template slot="merchantId" slot-scope="scope">
<el-select style="width: 100%" v-model="scope.scope.yqMerchantName" placeholder="请选择" @change="handleSelect(scope.scope, scope.scope.yqMerchantName)"> <el-form-item style="margin-bottom: 0px" :prop="'goodsWareHousingList.' + scope.index + '.merchantId'" :rules="rules.merchantId">
<el-option v-for="item in goodsList" :key="item.yqMerchantName" :label="item.goodsName" :value="item.yqMerchantName"></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>
...@@ -98,6 +100,8 @@ export default { ...@@ -98,6 +100,8 @@ export default {
data() { data() {
return { return {
goodsList: [], goodsList: [],
storeUsageList: [],
refByYqShopList: [],
tableParams: { tableParams: {
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
...@@ -108,19 +112,19 @@ export default { ...@@ -108,19 +112,19 @@ export default {
}, },
{ {
label: '入库仓库', label: '入库仓库',
prop: 'shopMerchantName', prop: 'yqMerchantId',
addHtml: 'shopMerchantName' addHtml: 'yqMerchantId'
}, },
{ {
label: '入库门店', label: '入库门店',
prop: 'yqMerchantName', prop: 'merchantId',
addHtml: 'yqMerchantName' addHtml: 'merchantId'
} }
] ]
}, },
rules: { rules: {
shopMerchantName: [{ required: true, message: '请选择入库仓库', trigger: 'change' }], yqMerchantId: [{ required: true, message: '请选择入库仓库', trigger: 'change' }],
yqMerchantName: [{ required: true, message: '请选择入库门店', trigger: 'change' }], merchantId: [{ required: true, message: '请选择入库门店', trigger: 'change' }],
increaseStockNum: [ increaseStockNum: [
{ required: true, message: '请输入入库数量', trigger: 'blur' } { required: true, message: '请输入入库数量', trigger: 'blur' }
// { validator: checkPrice, trigger: 'blur' } // { validator: checkPrice, trigger: 'blur' }
...@@ -130,82 +134,68 @@ export default { ...@@ -130,82 +134,68 @@ export default {
} }
}, },
created() { created() {
this.getfwsGoodsList() this.getMerchantList()
}, },
methods: { methods: {
handleSelect(data) {}, handleCalculate(){},
getfwsGoodsList() { getMerchantList() {
this.$apis.product.getfwsGoodsList({}).then(res => { this.$apis.purchaseShopping.getMerchantList({}).then(res => {
this.goodsList = res this.storeUsageList = res
}) })
}, },
handleDetailClose() { getRefByYqShopList(value) {
this.dialogShow = false this.$apis.purchaseShopping.get4SRefByYqShopList({ scene: 1, merchantId: value }).then(res => {
}, this.refByYqShopList = res
getDetail() { })
this.detailInfo = {
deliveryDate: '2023/04/21 14:00',
deliveryCompany: '顺丰速运',
deliveryNumber: 4435323513,
deliveryDetailList: [
{
stockNum: 2,
purchaseNumber: 10,
upgradeGoodsName: '商品名称',
goodsWareHousingList: [
{
increaseStockNum: '',
yqMerchantName: '',
yqMerchantId: '',
shopMerchantName: '',
shopMerchantId: ''
}, },
{ handleSelect(data, id) {
increaseStockNum: '', this.storeUsageList.forEach(item => {
yqMerchantName: '', if (item.merchantNo == id) {
yqMerchantId: '', data.yqMerchantName = item.merchantName
shopMerchantName: '', data.merchantId = ''
shopMerchantId: ''
} }
] })
this.getRefByYqShopList(id)
}, },
{ handleStoreSelect(data, id) {
stockNum: 2, this.refByYqShopList.forEach(item => {
purchaseNumber: 10, if (item.merchantId == id) {
upgradeGoodsName: '商品名称', data.merchantName = item.merchantName
goodsWareHousingList: [
{
increaseStockNum: '',
yqMerchantName: '',
yqMerchantId: '',
shopMerchantName: '',
shopMerchantId: ''
}
]
}
]
} }
})
},
handleDetailClose() {
this.dialogShow = false
},
getDetail() {
this.$apis.delivery.getDeliveryDetail({ id: this.id }).then(res => { this.$apis.delivery.getDeliveryDetail({ id: this.id }).then(res => {
console.log(res) if (res.code == 0) {
// this.detailInfo = res this.detailInfo = res.data
}
}) })
}, },
handleDelete(index, line) { handleDelete(index, line) {
this.detailInfo.deliveryDetailList[index].goodsWareHousingList.splice(line, 1) this.detailInfo.deliveryDetailList[index].goodsWareHousingList.splice(line, 1)
}, },
addLineTable(index) { 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: '', increaseStockNum: '',
yqMerchantName: '',
yqMerchantId: '', yqMerchantId: '',
shopMerchantName: '', yqMerchantName: '',
shopMerchantId: '' merchantId: '',
merchantName: ''
}) })
let data = this.detailInfo.deliveryDetailList
this.$set(data, index, data[index])
}, },
handleSave() { handleSave() {
this.$refs['addForm'].validate(valid => { console.log( this.$refs['addForm'])
this.$refs['addForm'].forEachvalidate(valid => {
if (valid) { if (valid) {
let purchaseOrderGoodsList = []
// this.formdata.tableData.forEach(item => { // this.formdata.tableData.forEach(item => {
// purchaseOrderGoodsList.push({ // purchaseOrderGoodsList.push({
// upgradeGoodsId: item.upgradeGoodsId, // upgradeGoodsId: item.upgradeGoodsId,
...@@ -215,18 +205,18 @@ export default { ...@@ -215,18 +205,18 @@ export default {
// goodsTotalPrice: item.goodsTotalPrice // goodsTotalPrice: item.goodsTotalPrice
// }) // })
// }) // })
// let params = { let params = {
// saveOrWarehousing, deliveryDetailList:this.detailInfo.deliveryDetailList,
// purchaseOrderGoodsList id:this.id
// } }
// if (this.id) params.id = this.id params.id = this.id
// this.$apis.product.addSelfOrder(params).then(res => { this.$apis.delivery.addPurchaseOrder(params).then(res => {
// this.$notify({ this.$notify({
// type: 'success', type: 'success',
// title: '操作成功' title: '操作成功'
// }) })
// this.goBack() this.goBack()
// }) })
} }
}) })
} }
......
...@@ -55,13 +55,10 @@ export default { ...@@ -55,13 +55,10 @@ export default {
placeholder: '请输入电话号码' placeholder: '请输入电话号码'
}, },
{ {
label: '', label: '收货地址',
name: 'provincesAndCities', name: 'provincesAndCities',
type: 'other', type: 'other',
addHtml: 'provincesAndCities', addHtml: 'provincesAndCities'
style: {
'padding-left': '104px'
}
}, },
{ {
label: '', label: '',
...@@ -109,16 +106,18 @@ export default { ...@@ -109,16 +106,18 @@ export default {
watch: { watch: {
visible(val) { visible(val) {
if (val) { if (val) {
console.log(this.addressInfo)
if (this.addressInfo) { if (this.addressInfo) {
this.editForm = this.$common.utils.deepClone(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 { } else {
this.editForm = {} this.editForm = {}
} }
} }
} }
}, },
created(){
this.getAreaInfo()
},
methods: { methods: {
// 获取省市区信息 // 获取省市区信息
getAreaInfo() { getAreaInfo() {
...@@ -126,12 +125,6 @@ export default { ...@@ -126,12 +125,6 @@ export default {
this.provincesAndCities_options = res.areaList this.provincesAndCities_options = res.areaList
}) })
}, },
handleOkFn() {
// console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
},
submit() { submit() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
...@@ -173,5 +166,7 @@ export default { ...@@ -173,5 +166,7 @@ export default {
.footer-btn { .footer-btn {
text-align: center; text-align: center;
} }
} }
</style> </style>
...@@ -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">商品编码:465365684631436</div>
<div class="skuCon"> <div class="skuCon">
<div class="label">规格:</div> <div class="label">规格:</div>
<div class="itemCon"> <div class="itemCon">
...@@ -329,4 +330,10 @@ export default { ...@@ -329,4 +330,10 @@ export default {
margin-bottom: 16px; margin-bottom: 16px;
} }
} }
.productCode{
font-weight: 400;
font-size: 14px;
color: #666666;
margin-bottom:16px;
}
</style> </style>
...@@ -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="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"> <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: '' }]
}, },
tableParams: { tableParams: {
tableOption: true, tableOption: true,
...@@ -109,17 +126,35 @@ export default { ...@@ -109,17 +126,35 @@ 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({}).then(res => {
this.storeUsageList = res
})
},
handleSave(saveOrWarehousing) { handleSave(saveOrWarehousing) {
this.$refs['addForm'].validate(valid => { this.$refs['addForm'].validate(valid => {
if (valid) { if (valid) {
...@@ -130,7 +165,11 @@ export default { ...@@ -130,7 +165,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,7 +205,6 @@ export default { ...@@ -166,7 +205,6 @@ export default {
}, },
getData() { getData() {
this.$apis.purchaseShopping.selectByOrderCode({ orderCode: this.orderCode }).then(res => { this.$apis.purchaseShopping.selectByOrderCode({ orderCode: this.orderCode }).then(res => {
this.formdata.tableData = res this.formdata.tableData = res
}) })
}, },
...@@ -187,31 +225,38 @@ export default { ...@@ -187,31 +225,38 @@ export default {
} }
}) })
}, },
getMerchantName(data, id) {},
handleCalculate(data, key) { 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)
...@@ -255,6 +300,6 @@ export default { ...@@ -255,6 +300,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!