Commit 0b9b22a5 by 王志慧

4.21.1需求开发

1 parent 8104c4da
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
...@@ -18,7 +18,7 @@ export const fetchConfig = function (common) { ...@@ -18,7 +18,7 @@ export const fetchConfig = function (common) {
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
let params = { moduleName: 'purchase', mockUrl: 'https://oss-config.glsx.com.cn/mock/643e06c7ea3da3a974f54357/purchase/config',env:'test', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } } let params = { moduleName: 'purchase', mockUrl: 'https://oss-config.glsx.com.cn/mock/643e06c7ea3da3a974f54357/purchase/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
return common.utils.getConfig(params) return common.utils.getConfig(params)
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config') // return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home').then(res => res) // return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home').then(res => res)
......
<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>{{ detailInfo.deliveryDate }}</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>{{ item.purchaseNumber }}卷</span>
</div>
<div>
可用库存数量:
<span>{{ item.stockNum }}</span>
</div>
<div class="add-btn" @click="addLineTable(index)">
添加入库记录
</div>
</div>
<el-form ref="addForm" :model="item" size="small" :rules="rules">
<GLTable ref="orderRef" :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>
</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>
</el-select>
</el-form-item>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDelete(index, scope.index)">删除</el-button>
</div>
</GLTable>
</el-form>
</div>
</template>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogShow = false">关闭</el-button>
<el-button type="primary" size="small" @click="handleSave">保存入库</el-button>
</span>
</GLDialog>
</template>
<script>
export default {
name: 'DeliverAdd',
props: {
visible: {
type: Boolean,
default: false
}
},
computed: {
dialogShow: {
get() {
if (this.visible) {
this.getDetail()
}
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
data() {
return {
goodsList: [],
tableParams: {
tableOption: true,
tableColumns: [
{
label: '入库数量/米',
prop: 'increaseStockNum',
addHtml: 'increaseStockNum'
},
{
label: '入库仓库',
prop: 'shopMerchantName',
addHtml: 'shopMerchantName'
},
{
label: '入库门店',
prop: 'yqMerchantName',
addHtml: 'yqMerchantName'
}
]
},
rules: {
shopMerchantName: [{ required: true, message: '请选择入库仓库', trigger: 'change' }],
yqMerchantName: [{ required: true, message: '请选择入库门店', trigger: 'change' }],
increaseStockNum: [
{ required: true, message: '请输入入库数量', trigger: 'blur' }
// { validator: checkPrice, trigger: 'blur' }
]
},
detailInfo: {}
}
},
created() {
this.getfwsGoodsList()
},
methods: {
handleSelect(data) {},
getfwsGoodsList() {
this.$apis.product.getfwsGoodsList({}).then(res => {
this.goodsList = res
})
},
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.purchaseShopping.purchaseOrderDetail({ orderCode: this.paramsObj.orderCode }).then(res => {
// this.detailInfo = res
// })
},
handleDelete(index, line) {
this.detailInfo.deliveryDetailList[index].goodsWareHousingList.splice(line, 1)
},
addLineTable(index) {
this.detailInfo.deliveryDetailList[index].goodsWareHousingList.unshift({
increaseStockNum: '',
yqMerchantName: '',
yqMerchantId: '',
shopMerchantName: '',
shopMerchantId: ''
})
},
handleSave() {
this.$refs['addForm'].validate(valid => {
if (valid) {
let purchaseOrderGoodsList = []
// this.formdata.tableData.forEach(item => {
// purchaseOrderGoodsList.push({
// upgradeGoodsId: item.upgradeGoodsId,
// goodsName: item.goodsName,
// goodsNumber: item.goodsNumber,
// upgradePurchasePrice: item.upgradePurchasePrice,
// 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()
// })
}
})
}
}
}
</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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!