Commit 0a5a68b7 authored by chuan.liu's avatar chuan.liu

材料计划联调

parent 8962c2c3
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<view class="cell-list"> <view class="cell-list">
<view class="middle view planout-block-item"> <view class="middle view planout-block-item">
<view class="item-block item-block-code"> <view class="item-block item-block-code">
<text class="item-block-label">单号:{{itemHead.PRODPL_ID}}</text> <text class="item-block-label">单号:{{itemHead.PACKPL_ID}}</text>
<button class="item-block-btn" type="default"><text <button class="item-block-btn" type="default"><text
class="item-block-btn__text">{{itemHead.STATUS}}</text></button> class="item-block-btn__text">{{itemHead.STATUS}}</text></button>
</view> </view>
<view class="item-block item-block-name"> <view class="item-block item-block-name">
<text class="item-block-label item-block__label">高端总经销材料计划</text> <text class="item-block-label item-block__label">{{itemHead.PACKTYPE}}</text>
</view> </view>
<view class="item-block"> <view class="item-block">
<text class="item-block-label-des">{{itemHead.DATUM}}</text> <text class="item-block-label-des">{{itemHead.DATUM}}</text>
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
</view> </view>
<view class="block-detal-item block-detal-item-last"> <view class="block-detal-item block-detal-item-last">
<text class="detal-item-label">吨数</text> <text class="detal-item-label">吨数</text>
<text class="detal-item-value">7</text> <text class="detal-item-value">{{item.PLANQTY_TON}}</text>
</view> </view>
</view> </view>
<view class="item-block"> <view class="item-block">
<text class="item-block-label-des">尽快发货</text> <text class="item-block-label-des">{{itemHead.REMARK}}</text>
</view> </view>
<view class="item-block item-block-date"> <view class="item-block item-block-date">
<text class="detal-item-label">备注</text> <text class="detal-item-label">备注</text>
...@@ -196,13 +196,10 @@ ...@@ -196,13 +196,10 @@
} }
.item-block-btn { .item-block-btn {
width: 120rpx;
height: 48rpx; height: 48rpx;
line-height: 48rpx; line-height: 44rpx;
background: #f61d30; background: #f61d30;
border-radius: 80rpx 200rpx 200rpx 80rpx; border-radius: 80rpx 200rpx 200rpx 80rpx;
font-size: 12px;
color: #fff;
text-align: center; text-align: center;
} }
......
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
} from 'vuex' } from 'vuex'
import { import {
apiGetProduceOrder apiGetProduceMaterialOrder
} from '@/servers/produceOrder.js' } from '@/servers/produceMaterial.js'
export default { export default {
components: { components: {
...@@ -77,15 +77,7 @@ ...@@ -77,15 +77,7 @@
}, },
data() { data() {
return { return {
dataList: [{ dataList: [],
id: "tab01",
name: '最新',
newsid: 0
}, {
id: "tab02",
name: '大公司',
newsid: 23
}],
navigateFlag: false, navigateFlag: false,
pulling: false, pulling: false,
refreshing: false, refreshing: false,
...@@ -163,7 +155,7 @@ ...@@ -163,7 +155,7 @@
...this.page ...this.page
} }
apiGetProduceOrder(params).then((res) => { apiGetProduceMaterialOrder(params).then((res) => {
console.log('loadData', res) console.log('loadData', res)
const { const {
DATA, DATA,
...@@ -204,6 +196,7 @@ ...@@ -204,6 +196,7 @@
}) })
}, },
loadMore(e) { loadMore(e) {
console.log('loadMore')
this.page.PAGE++ this.page.PAGE++
this.loadData(); this.loadData();
}, },
......
This diff is collapsed.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
class="item-block-btn__text">{{itemHead.STATUS}}</text></button> class="item-block-btn__text">{{itemHead.STATUS}}</text></button>
</view> </view>
<view class="item-block item-block-name"> <view class="item-block item-block-name">
<text class="item-block-label item-block__label">配额生产计划</text> <text class="item-block-label item-block__label">{{itemHead.PRODPLTYPE}}</text>
</view> </view>
<view class="item-block"> <view class="item-block">
<text class="item-block-label-des">{{itemHead.DATUM}}</text> <text class="item-block-label-des">{{itemHead.DATUM}}</text>
......
...@@ -105,7 +105,8 @@ ...@@ -105,7 +105,8 @@
import { import {
apiProducePlanInit, apiProducePlanInit,
apiUpdateProducePlanData, apiUpdateProducePlanData,
apiUpdateProduceOrder apiUpdateProduceOrder,
apiSubmitProduceOrder
} from '@/servers/produceOrder.js' } from '@/servers/produceOrder.js'
export default { export default {
...@@ -113,7 +114,6 @@ ...@@ -113,7 +114,6 @@
return { return {
isChecked: false, isChecked: false,
scrollTop: 0, scrollTop: 0,
orderNo: '',
selectedSalesCenterArr: [{ selectedSalesCenterArr: [{
KEY: -1, KEY: -1,
VALUE: '' VALUE: ''
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
} }
const res = await apiProducePlanInit(params) const res = await apiProducePlanInit(params)
const { const {
INFO, HEAD,
YXDY, YXDY,
ITEM ITEM
} = res.DATA } = res.DATA
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
...this.planinnerLists[0], ...this.planinnerLists[0],
...ITEM[0] ...ITEM[0]
} }
this.HEADINFO = INFO this.HEADINFO = HEAD
this.productInitInfo = ITEM[0] this.productInitInfo = ITEM[0]
}, },
async updateNoQuotaData(productIndex, mode = '', product) { async updateNoQuotaData(productIndex, mode = '', product) {
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
item_inner = [productAfterInit] item_inner = [productAfterInit]
const params = { const params = {
"INFO": this.HEADINFO, "HEAD": this.HEADINFO,
"ITEM": item_inner, "ITEM": item_inner,
} }
const res = await apiUpdateProducePlanData(params) const res = await apiUpdateProducePlanData(params)
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
let obj = {} let obj = {}
this.planinnerLists = this.planinnerLists.map((item, i) => { this.planinnerLists = this.planinnerLists.map((item, i) => {
if (i === productIndex) { if (i === productIndex) {
item.ORDERED_PROD = PRODUCT_ID item.PROD_ID = PRODUCT_ID
item.DESCRIPTION = SHORT_TEXT item.DESCRIPTION = SHORT_TEXT
item.PLANQTY_BOX = item.quantity item.PLANQTY_BOX = item.quantity
obj = item obj = item
...@@ -288,9 +288,6 @@ ...@@ -288,9 +288,6 @@
handleDel(index, ) { handleDel(index, ) {
this.planinnerLists.splice(index, 1) this.planinnerLists.splice(index, 1)
}, },
change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show);
},
fnBackHome() { fnBackHome() {
this.resetData() this.resetData()
this.$refs.popup.close() this.$refs.popup.close()
...@@ -314,11 +311,26 @@ ...@@ -314,11 +311,26 @@
async submit() { async submit() {
const params = { const params = {
INFO: this.HEADINFO, HEAD: this.HEADINFO,
ITEM: this.planinnerLists ITEM: this.planinnerLists
} }
const res = await apiUpdateProduceOrder(params) const res = await apiUpdateProduceOrder(params)
const {
DATA1: HEAD2,
DATA2: ITEM2
} = res
const params2 = {
HEAD: HEAD2,
ITEM: ITEM2
}
// this.HEADINFO = HEAD2
// this.planinnerLists = ITEM2
const res2 = await apiSubmitProduceOrder(params2)
this.orderInfo = res.DATA1 this.orderInfo = res.DATA1
this.$refs.popup.open('center') this.$refs.popup.open('center')
......
import apiHelper from './api.helper.js'
/**
* 根据搜索条件查询材料计划信息。
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiGetProduceMaterialOrder(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/get_m_plan_app', params)
return res
}
/**
* 材料计划创建初始化数据。
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiProduceMaterialPlanInit(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/m_plan_init', params)
return res
}
/**
* 材料计划项目更新数据
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiUpdateProduceMaterialPlanData(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/m_plan_update', params)
return res
}
/**
* 材料计划单保存。
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiUpdateProduceMaterialOrder(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/prodplan03', params)
return res
}
/**
* 材料计划单提交。
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiSubmitProduceMaterialOrder(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/masterdata/materialplnsubm', params)
return res
}
/**
* 查询客户可售产品。
* @param captcha 验证码
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiProductSelect(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/bp_pro_search', params)
return res
}
...@@ -32,11 +32,21 @@ export async function apiUpdateProducePlanData(params) { ...@@ -32,11 +32,21 @@ export async function apiUpdateProducePlanData(params) {
} }
/** /**
* 生产计划单提交 * 生产计划单保存
* @param * @param
* @returns {Promise<AxiosResponse<T>>} * @returns {Promise<AxiosResponse<T>>}
*/ */
export async function apiUpdateProduceOrder(params) { export async function apiUpdateProduceOrder(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/prodplan03', params)
return res
}
/**
* 生产计划单提交。
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiSubmitProduceOrder(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/prodplan003', params) const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/prodplan003', params)
return res return res
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment