|
|
@@ -246,7 +246,7 @@ Page({
|
|
|
//处理库存量
|
|
|
this.calculationSalesUsableQty()
|
|
|
})
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.setData({
|
|
|
formData: JSON.stringify(formData),
|
|
|
})
|
|
|
@@ -536,7 +536,7 @@ Page({
|
|
|
* @date : 2024/2/1 15:49
|
|
|
* @author : 于继渤
|
|
|
*/
|
|
|
- setParams(params) {
|
|
|
+ setParams(params) {
|
|
|
let itemIndex = 0
|
|
|
let formData = JSON.parse(this.data.formData)
|
|
|
params.fromId = params.orderId
|
|
|
@@ -553,7 +553,7 @@ Page({
|
|
|
res['supId'] = res.supId ? res.supId : null
|
|
|
res['fromId'] = res.fromId ? res.fromId : res.sOutId
|
|
|
res['fromItemId'] = res.fromItemId ? res.fromItemId : res.sOutItemId
|
|
|
- // res.outQty = res.outingQty
|
|
|
+ // res.outQty = res.outingQty
|
|
|
res.factPrice = res.priceOut
|
|
|
res.factAmt = res.outingAmt
|
|
|
res.costAmt = Number(res.outingQty * res.costPrice)
|
|
|
@@ -601,13 +601,13 @@ Page({
|
|
|
console.log('params', params)
|
|
|
return params
|
|
|
},
|
|
|
- /**
|
|
|
- * @desc : 数值转出负值
|
|
|
- * @date : 2024/2/1 15:49
|
|
|
- * @author : 王英杰
|
|
|
- */
|
|
|
- convertToNegative(number){
|
|
|
- return Math.abs(number)*-1
|
|
|
+ /**
|
|
|
+ * @desc : 数值转出负值
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
+ * @author : 王英杰
|
|
|
+ */
|
|
|
+ convertToNegative(number) {
|
|
|
+ return Math.abs(number) * -1
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 保存数据服务
|
|
|
@@ -631,7 +631,7 @@ Page({
|
|
|
if (this.data.formMode == Constants.formMode.detail) { //办理
|
|
|
return this.excute(this.data.service, this.data.service.saleReturnHandleOutbound, this.data.params);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 处理保存后的数据
|
|
|
@@ -1457,60 +1457,107 @@ Page({
|
|
|
title: '编辑销售退货'
|
|
|
})
|
|
|
let contentObj = this.data.contentObj
|
|
|
- contentObj.main = [{
|
|
|
- code: 'cusName',
|
|
|
- type: 'selectIcon',
|
|
|
- urlKey: 'selectCustomers',
|
|
|
- required: true,
|
|
|
- readonly: this.data.formType =='edit'?true:false,
|
|
|
- readonlyItem: this.data.formType =='edit'?true:false,
|
|
|
- title: mixins.$t('customerName')
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'cusPhone',
|
|
|
- type: 'phone',
|
|
|
- title: mixins.$t('cusPhone'),
|
|
|
- readonly: this.data.formType =='edit'?true:false,
|
|
|
- readonlyItem: this.data.formType =='edit'?true:false,
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'addressFull',
|
|
|
- type: 'address',
|
|
|
- title: mixins.$t('addressFull'),
|
|
|
- required: true,
|
|
|
- readonly: this.data.formType =='edit'?true:false,
|
|
|
- readonlyItem: this.data.formType =='edit'?true:false,
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'addressNo',
|
|
|
- type: 'str',
|
|
|
- required: true,
|
|
|
- title: mixins.$t('addressNo'),
|
|
|
- readonly: this.data.formType =='edit'?true:false,
|
|
|
- readonlyItem: this.data.formType =='edit'?true:false,
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'channelId',
|
|
|
- name: 'channelName',
|
|
|
- type: 'drop',
|
|
|
- required: true,
|
|
|
- dropType: 'saleChannel',
|
|
|
- title: mixins.$t('saleChannel'),
|
|
|
- readonly: this.data.formType =='edit'?true:false,
|
|
|
- readonlyItem: this.data.formType =='edit'?true:false,
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'cusFrom',
|
|
|
- name: 'cusFromName',
|
|
|
- type: 'drop',
|
|
|
- required: false,
|
|
|
- dropType: 'customerFrom',
|
|
|
- title: mixins.$t('customerSource'),
|
|
|
- readonly: this.data.formType =='edit'?true:false,
|
|
|
- readonlyItem: this.data.formType =='edit'?true:false,
|
|
|
- },
|
|
|
- ]
|
|
|
+ if (this.data.gradeCode == Constants.gradeCode.STD) {
|
|
|
+ contentObj.main = [{
|
|
|
+ code: 'cusName',
|
|
|
+ type: 'selectIcon',
|
|
|
+ urlKey: 'selectCustomers',
|
|
|
+ required: true,
|
|
|
+ readonly: this.data.formType == 'edit' ? true : false,
|
|
|
+ readonlyItem: this.data.formType == 'edit' ? true : false,
|
|
|
+ title: mixins.$t('customerName')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'cusPhone',
|
|
|
+ type: 'phone',
|
|
|
+ title: mixins.$t('cusPhone'),
|
|
|
+ readonly: this.data.formType == 'edit' ? true : false,
|
|
|
+ readonlyItem: this.data.formType == 'edit' ? true : false,
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'addressFull',
|
|
|
+ type: 'address',
|
|
|
+ title: mixins.$t('addressFull'),
|
|
|
+ required: true,
|
|
|
+ readonly: this.data.formType == 'edit' ? true : false,
|
|
|
+ readonlyItem: this.data.formType == 'edit' ? true : false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'addressNo',
|
|
|
+ type: 'str',
|
|
|
+ required: true,
|
|
|
+ title: mixins.$t('addressNo'),
|
|
|
+ readonly: this.data.formType == 'edit' ? true : false,
|
|
|
+ readonlyItem: this.data.formType == 'edit' ? true : false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'channelId',
|
|
|
+ name: 'channelName',
|
|
|
+ type: 'drop',
|
|
|
+ required: true,
|
|
|
+ dropType: 'saleChannel',
|
|
|
+ title: mixins.$t('saleChannel'),
|
|
|
+ readonly: this.data.formType == 'edit' ? true : false,
|
|
|
+ readonlyItem: this.data.formType == 'edit' ? true : false,
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ } else {
|
|
|
+ contentObj.main = [{
|
|
|
+ code: 'cusName',
|
|
|
+ type: 'selectIcon',
|
|
|
+ urlKey: 'selectCustomers',
|
|
|
+ required: true,
|
|
|
+ readonly: this.data.formType == 'edit' ? true : false,
|
|
|
+ readonlyItem: this.data.formType == 'edit' ? true : false,
|
|
|
+ title: mixins.$t('customerName')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'cusPhone',
|
|
|
+ type: 'phone',
|
|
|
+ title: mixins.$t('cusPhone'),
|
|
|
+ readonly: this.data.formType == 'edit' ? true : false,
|
|
|
+ readonlyItem: this.data.formType == 'edit' ? true : false,
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'addressFull',
|
|
|
+ type: 'address',
|
|
|
+ title: mixins.$t('addressFull'),
|
|
|
+ required: true,
|
|
|
+ readonly: this.data.formType == 'edit' ? true : false,
|
|
|
+ readonlyItem: this.data.formType == 'edit' ? true : false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'addressNo',
|
|
|
+ type: 'str',
|
|
|
+ required: true,
|
|
|
+ title: mixins.$t('addressNo'),
|
|
|
+ readonly: this.data.formType == 'edit' ? true : false,
|
|
|
+ readonlyItem: this.data.formType == 'edit' ? true : false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'channelId',
|
|
|
+ name: 'channelName',
|
|
|
+ type: 'drop',
|
|
|
+ required: true,
|
|
|
+ dropType: 'saleChannel',
|
|
|
+ title: mixins.$t('saleChannel'),
|
|
|
+ readonly: this.data.formType == 'edit' ? true : false,
|
|
|
+ readonlyItem: this.data.formType == 'edit' ? true : false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'cusFrom',
|
|
|
+ name: 'cusFromName',
|
|
|
+ type: 'drop',
|
|
|
+ required: false,
|
|
|
+ dropType: 'customerFrom',
|
|
|
+ title: mixins.$t('customerSource'),
|
|
|
+ readonly: this.data.formType == 'edit' ? true : false,
|
|
|
+ readonlyItem: this.data.formType == 'edit' ? true : false,
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }
|
|
|
this.setData({
|
|
|
satffAndOrgReadonly: true,
|
|
|
contentObj: contentObj,
|