|
|
@@ -17,96 +17,96 @@ Page({
|
|
|
customerService: app.globalData['customerService'],
|
|
|
saleChannelService: app.globalData['saleChannelService'],
|
|
|
cardList: [{
|
|
|
- name: 'main',
|
|
|
- title: mixins.$t("customerInformation")
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'items',
|
|
|
- title: mixins.$t("goodsDetail"),
|
|
|
+ name: 'main',
|
|
|
+ title: mixins.$t("customerInformation")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'items',
|
|
|
+ title: mixins.$t("goodsDetail"),
|
|
|
|
|
|
- chooseGoodsFlag: false,
|
|
|
- chooseGoodsItemFlag: true,
|
|
|
- chooseInventoryFlag: true,
|
|
|
- chooseCoordinationFlag: true,
|
|
|
+ chooseGoodsFlag: false,
|
|
|
+ chooseGoodsItemFlag: true,
|
|
|
+ chooseInventoryFlag: true,
|
|
|
+ chooseCoordinationFlag: true,
|
|
|
|
|
|
- itemAmt: '',
|
|
|
- displayNum: 2
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'other',
|
|
|
- title: mixins.$t("otherInfo")
|
|
|
- }
|
|
|
+ itemAmt: '',
|
|
|
+ displayNum: 2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'other',
|
|
|
+ title: mixins.$t("otherInfo")
|
|
|
+ }
|
|
|
],
|
|
|
contentObj: {
|
|
|
main: [{
|
|
|
- code: 'cusName',
|
|
|
- type: 'selectIcon',
|
|
|
- urlKey: 'selectCustomers',
|
|
|
- required: true,
|
|
|
- readonly: false,
|
|
|
- title: mixins.$t('customerName')
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'cusPhone',
|
|
|
- type: 'phone',
|
|
|
- title: mixins.$t('cusPhone'),
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'addressFull',
|
|
|
- type: 'address',
|
|
|
- title: mixins.$t('addressFull'),
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'addressNo',
|
|
|
- type: 'str',
|
|
|
- required: true,
|
|
|
- title: mixins.$t('addressNo')
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'channelId',
|
|
|
- name: 'channelName',
|
|
|
- required: true,
|
|
|
- title: mixins.$t('saleChannel'),
|
|
|
- type: 'choose',
|
|
|
- urlKey: 'chooseChannel'
|
|
|
- },
|
|
|
+ code: 'cusName',
|
|
|
+ type: 'selectIcon',
|
|
|
+ urlKey: 'selectCustomers',
|
|
|
+ required: true,
|
|
|
+ readonly: false,
|
|
|
+ title: mixins.$t('customerName')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'cusPhone',
|
|
|
+ type: 'phone',
|
|
|
+ title: mixins.$t('cusPhone'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'addressFull',
|
|
|
+ type: 'address',
|
|
|
+ title: mixins.$t('addressFull'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'addressNo',
|
|
|
+ type: 'str',
|
|
|
+ required: true,
|
|
|
+ title: mixins.$t('addressNo')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'channelId',
|
|
|
+ name: 'channelName',
|
|
|
+ required: true,
|
|
|
+ title: mixins.$t('saleChannel'),
|
|
|
+ type: 'choose',
|
|
|
+ urlKey: 'chooseChannel'
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- code: 'cusFrom',
|
|
|
- name: 'cusFromName',
|
|
|
- required: true,
|
|
|
- title: mixins.$t('customerSource'),
|
|
|
- type: 'choose',
|
|
|
- urlKey: 'choosecusFrom'
|
|
|
- },
|
|
|
+ {
|
|
|
+ code: 'cusFrom',
|
|
|
+ name: 'cusFromName',
|
|
|
+ required: true,
|
|
|
+ title: mixins.$t('customerSource'),
|
|
|
+ type: 'choose',
|
|
|
+ urlKey: 'choosecusFrom'
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- code: 'contactName',
|
|
|
- type: 'str',
|
|
|
- required: false,
|
|
|
- title: mixins.$t('contactName')
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'contactPhone',
|
|
|
- type: 'str',
|
|
|
- title: mixins.$t('cpPhone'),
|
|
|
- required: false
|
|
|
- },
|
|
|
+ {
|
|
|
+ code: 'contactName',
|
|
|
+ type: 'str',
|
|
|
+ required: false,
|
|
|
+ title: mixins.$t('contactName')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'contactPhone',
|
|
|
+ type: 'str',
|
|
|
+ title: mixins.$t('cpPhone'),
|
|
|
+ required: false
|
|
|
+ },
|
|
|
|
|
|
],
|
|
|
items: [{
|
|
|
- code: 'collectType',
|
|
|
- name: 'collectName',
|
|
|
- type: 'drop',
|
|
|
- dropType: 'collect'
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'collectAmount',
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("amountCollected")
|
|
|
- }
|
|
|
+ code: 'collectType',
|
|
|
+ name: 'collectName',
|
|
|
+ type: 'drop',
|
|
|
+ dropType: 'collect'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'collectAmount',
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("amountCollected")
|
|
|
+ }
|
|
|
],
|
|
|
other: [
|
|
|
// { code: 'contractNo', type: 'textarea', title: mixins.$t("contractNumber"), readonly: false },
|
|
|
@@ -132,114 +132,114 @@ Page({
|
|
|
},
|
|
|
//按钮
|
|
|
buttonSaveList: [{
|
|
|
- code: 'collection',
|
|
|
- title: mixins.$t("collection"),
|
|
|
- plain: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'save',
|
|
|
- title: mixins.$t("save")
|
|
|
- }
|
|
|
+ code: 'collection',
|
|
|
+ title: mixins.$t("collection"),
|
|
|
+ plain: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'save',
|
|
|
+ title: mixins.$t("save")
|
|
|
+ }
|
|
|
],
|
|
|
contentSaveList: [{
|
|
|
- code: 'flag',
|
|
|
- title: mixins.$t("saleOutBoundFlag"),
|
|
|
- type: 'checkbox'
|
|
|
- },
|
|
|
- // { code: 'need', title: mixins.$t("saleCollection"), type: 'str' },
|
|
|
+ code: 'flag',
|
|
|
+ title: mixins.$t("saleOutBoundFlag"),
|
|
|
+ type: 'checkbox'
|
|
|
+ },
|
|
|
+ // { code: 'need', title: mixins.$t("saleCollection"), type: 'str' },
|
|
|
|
|
|
- {
|
|
|
- code: 'factAmt',
|
|
|
- content: 0,
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("actualTotalAmount")
|
|
|
- },
|
|
|
+ {
|
|
|
+ code: 'factAmt',
|
|
|
+ content: 0,
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("actualTotalAmount")
|
|
|
+ },
|
|
|
],
|
|
|
popContent: [{
|
|
|
- code: 'itemQty',
|
|
|
- type: 'step',
|
|
|
- title: mixins.$t("count"),
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'packageBox',
|
|
|
- type: 'packageBox',
|
|
|
- title: mixins.$t("packageBox"),
|
|
|
- },
|
|
|
- // { code: 'box', type: 'step', title: mixins.$t("goodsBox"), required: true },
|
|
|
- // { code: 'piece', type: 'step', title: mixins.$t("goodsPiece"), required: true },
|
|
|
- {
|
|
|
- code: 'priceSale',
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("priceSale"),
|
|
|
- required: true,
|
|
|
- center: 'right',
|
|
|
- readonly: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'factPrice',
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("factPrice"),
|
|
|
- required: true,
|
|
|
- readonly: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'discount',
|
|
|
- title: mixins.$t("goodswholeOrderDiscount"),
|
|
|
- type: 'number',
|
|
|
- digits: 0,
|
|
|
- sign: '',
|
|
|
- percentSignFlag: true,
|
|
|
- inputColor: '#95A8CB'
|
|
|
- },
|
|
|
+ code: 'itemQty',
|
|
|
+ type: 'step',
|
|
|
+ title: mixins.$t("count"),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'packageBox',
|
|
|
+ type: 'packageBox',
|
|
|
+ title: mixins.$t("packageBox"),
|
|
|
+ },
|
|
|
+ // { code: 'box', type: 'step', title: mixins.$t("goodsBox"), required: true },
|
|
|
+ // { code: 'piece', type: 'step', title: mixins.$t("goodsPiece"), required: true },
|
|
|
+ {
|
|
|
+ code: 'priceSale',
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("priceSale"),
|
|
|
+ required: true,
|
|
|
+ center: 'right',
|
|
|
+ readonly: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'factPrice',
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("factPrice"),
|
|
|
+ required: true,
|
|
|
+ readonly: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'discount',
|
|
|
+ title: mixins.$t("goodswholeOrderDiscount"),
|
|
|
+ type: 'number',
|
|
|
+ digits: 0,
|
|
|
+ sign: '',
|
|
|
+ percentSignFlag: true,
|
|
|
+ inputColor: '#95A8CB'
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- code: 'whId',
|
|
|
- name: 'whName',
|
|
|
- title: mixins.$t("warehouseId"),
|
|
|
- type: 'choose',
|
|
|
- urlKey: 'openingInventory',
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'brandName',
|
|
|
- title: mixins.$t('brandName'),
|
|
|
- type: 'str',
|
|
|
- readonly: true,
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'nonStdCode',
|
|
|
- title: mixins.$t("goodsBatch"),
|
|
|
- type: 'str',
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'flgGift',
|
|
|
- title: mixins.$t("flgGift"),
|
|
|
- type: 'checkbox',
|
|
|
- tipFlag: true,
|
|
|
- outSetFlag: true,
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'usePlace',
|
|
|
- title: mixins.$t("usePlace"),
|
|
|
- type: 'str',
|
|
|
- },
|
|
|
- ],
|
|
|
- // 新手引导
|
|
|
- step: {
|
|
|
- name: 'order',
|
|
|
- guideList: [{
|
|
|
- el: "#dkForm>>>#cusName",
|
|
|
- tips: mixins.$t('chooseCustomer'),
|
|
|
+ {
|
|
|
+ code: 'whId',
|
|
|
+ name: 'whName',
|
|
|
+ title: mixins.$t("warehouseId"),
|
|
|
+ type: 'choose',
|
|
|
+ urlKey: 'openingInventory',
|
|
|
},
|
|
|
{
|
|
|
- el: "#dkForm>>>#items",
|
|
|
- tips: mixins.$t('chooseItems'),
|
|
|
+ code: 'brandName',
|
|
|
+ title: mixins.$t('brandName'),
|
|
|
+ type: 'str',
|
|
|
+ readonly: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'nonStdCode',
|
|
|
+ title: mixins.$t("goodsBatch"),
|
|
|
+ type: 'str',
|
|
|
},
|
|
|
{
|
|
|
- el: "#saveButton>>>#saveButton",
|
|
|
- tips: mixins.$t('saveAndReceiptButton'),
|
|
|
- fixed: true,
|
|
|
+ code: 'flgGift',
|
|
|
+ title: mixins.$t("flgGift"),
|
|
|
+ type: 'checkbox',
|
|
|
+ tipFlag: true,
|
|
|
+ outSetFlag: true,
|
|
|
},
|
|
|
+ {
|
|
|
+ code: 'usePlace',
|
|
|
+ title: mixins.$t("usePlace"),
|
|
|
+ type: 'str',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ // 新手引导
|
|
|
+ step: {
|
|
|
+ name: 'order',
|
|
|
+ guideList: [{
|
|
|
+ el: "#dkForm>>>#cusName",
|
|
|
+ tips: mixins.$t('chooseCustomer'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ el: "#dkForm>>>#items",
|
|
|
+ tips: mixins.$t('chooseItems'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ el: "#saveButton>>>#saveButton",
|
|
|
+ tips: mixins.$t('saveAndReceiptButton'),
|
|
|
+ fixed: true,
|
|
|
+ },
|
|
|
]
|
|
|
},
|
|
|
table: Constants.tables.order,
|
|
|
@@ -249,32 +249,32 @@ Page({
|
|
|
// flgBackStockInvoicingSetting: app.globalData.setting[Constants.settingCode.IVT002] == "true" ? true : false,
|
|
|
flgHandleSetting: app.globalData.setting[Constants.settingCode.IVT002] == "true" ? true : false,
|
|
|
popContentReverse: [{
|
|
|
- code: 'sumAmount',
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("totalAmount"),
|
|
|
- readonly: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'discount',
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("wholeOrderDiscount"),
|
|
|
- digits: 0,
|
|
|
- sign: '',
|
|
|
- percentSignFlag: true,
|
|
|
- inputColor: '#95A8CB'
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'discAmt',
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("sumWaiveAmt"),
|
|
|
- digits: 2,
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'factAmt',
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("actualTotalAmount"),
|
|
|
- negativeNumber: true
|
|
|
- },
|
|
|
+ code: 'sumAmount',
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("totalAmount"),
|
|
|
+ readonly: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'discount',
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("wholeOrderDiscount"),
|
|
|
+ digits: 0,
|
|
|
+ sign: '',
|
|
|
+ percentSignFlag: true,
|
|
|
+ inputColor: '#95A8CB'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'discAmt',
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("sumWaiveAmt"),
|
|
|
+ digits: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'factAmt',
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("actualTotalAmount"),
|
|
|
+ negativeNumber: true
|
|
|
+ },
|
|
|
],
|
|
|
|
|
|
},
|
|
|
@@ -285,14 +285,14 @@ Page({
|
|
|
* @author : 于继渤
|
|
|
*/
|
|
|
openReverseCalculationPop() {
|
|
|
-
|
|
|
+
|
|
|
let formData = JSON.parse(this.data.formData)
|
|
|
let goodsListAmt = formData.goodsList.sum("priceSale")
|
|
|
if ((formData.goodsList.length <= 0) || goodsListAmt == 0) { //没有商品或者价格都是零的时候不能点开折扣反算
|
|
|
return
|
|
|
}
|
|
|
//受 销售订单编辑逻辑 限制 转出库后(订单上的出库中加上已出库数量大于0 即证明有后续出库) 不能弹出总单反算pop
|
|
|
- if (formData.outingQty&&formData.outQty&&(Number(formData.outingQty)+Number(formData.outQty))>0) {
|
|
|
+ if (formData.outingQty && formData.outQty && (Number(formData.outingQty) + Number(formData.outQty)) > 0) {
|
|
|
return
|
|
|
}
|
|
|
let cardList = this.data.cardList
|
|
|
@@ -317,7 +317,7 @@ Page({
|
|
|
* @date : 2024/2/1 15:49
|
|
|
* @author : 于继渤
|
|
|
*/
|
|
|
- blurNumberField(e) {
|
|
|
+ blurNumberField(e) {
|
|
|
let key = e.detail.key
|
|
|
let value = null
|
|
|
let dataItem = JSON.parse(this.data.dataItem)
|
|
|
@@ -330,7 +330,7 @@ Page({
|
|
|
dataItem.discount = value * 100 //整单折扣
|
|
|
dataItem.factAmt = Number(dataItem.sumAmount) * Number(value) //实际合计金额 = 合计金额*总单折扣
|
|
|
dataItem.discAmt = util.handleQty(Number(dataItem.sumAmount) - Number(dataItem.factAmt)) // 优惠 = 合计金额-实际合计金额
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
if (key == "discAmt") //修改优惠金额
|
|
|
{
|
|
|
@@ -355,7 +355,7 @@ Page({
|
|
|
* @date : 2024/2/1 15:49
|
|
|
* @author : 于继渤
|
|
|
*/
|
|
|
- editItemsReverse(e) {
|
|
|
+ editItemsReverse(e) {
|
|
|
this.calculateDiscounts()
|
|
|
},
|
|
|
/**
|
|
|
@@ -408,7 +408,7 @@ Page({
|
|
|
* @date : 2024/2/1 15:49
|
|
|
* @author : 于继渤
|
|
|
*/
|
|
|
- openPopDkNumberInput(e) {
|
|
|
+ openPopDkNumberInput(e) {
|
|
|
let dataItem = JSON.parse(e.detail.dataItem)
|
|
|
let key = e.detail.key
|
|
|
if (key == "priceSale" || key == "factPrice") {
|
|
|
@@ -469,7 +469,7 @@ Page({
|
|
|
* @date : 2024/1/26 11:46
|
|
|
*/
|
|
|
changePhoneblur(e) {
|
|
|
- let formData = JSON.parse(this.data.formData)
|
|
|
+ let formData = JSON.parse(this.data.formData)
|
|
|
if (formData.cusPhone) {
|
|
|
this.getCustomerData({
|
|
|
cusPhone: formData.cusPhone
|
|
|
@@ -485,7 +485,7 @@ Page({
|
|
|
getCustomerData(params) {
|
|
|
return this.excute(this.data.customerService, this.data.customerService.selectByCondNoPage, params).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- if (res.data.data.length > 0) {
|
|
|
+ if (res.data.data.length > 0) {
|
|
|
let formData = JSON.parse(this.data.formData)
|
|
|
let item = res.data.data[0]
|
|
|
formData.cusCode = item.cusCode
|
|
|
@@ -526,7 +526,7 @@ Page({
|
|
|
* @author : 于继渤
|
|
|
* @date : 2024/1/26 11:46
|
|
|
*/
|
|
|
- chooseData(e) {
|
|
|
+ chooseData(e) {
|
|
|
let item = e.detail.data
|
|
|
let code = e.detail.code
|
|
|
let formData = JSON.parse(this.data.formData)
|
|
|
@@ -574,10 +574,10 @@ Page({
|
|
|
formData.staff = item.staffItem
|
|
|
formData['staffId'] = item.staffMain.staffId
|
|
|
formData['staffName'] = item.staffMain.staffName
|
|
|
- formData['staffList'] = item.staffList
|
|
|
+ formData['staffList'] = item.staffList
|
|
|
}
|
|
|
///设置主从业务部门
|
|
|
- if (code == 'org') {
|
|
|
+ if (code == 'org') {
|
|
|
formData.org = item.orgItem
|
|
|
formData['orgId'] = item.orgMain.orgId
|
|
|
formData['orgName'] = item.orgMain.orgName
|
|
|
@@ -632,8 +632,8 @@ Page({
|
|
|
* @date : 2024/2/1 15:49
|
|
|
* @author : 于继渤
|
|
|
*/
|
|
|
- deleteItemList(e) {
|
|
|
- let formData = JSON.parse(e.detail.form)
|
|
|
+ deleteItemList(e) {
|
|
|
+ let formData = JSON.parse(e.detail.form)
|
|
|
this.calculateAmount(formData)
|
|
|
},
|
|
|
/**
|
|
|
@@ -646,8 +646,8 @@ Page({
|
|
|
let list = this.setItemList(params.goodsList)
|
|
|
params.itemList = list //明细
|
|
|
params.itemList.forEach(element => {
|
|
|
- element.priceStd = element.priceStd?element.priceStd:0
|
|
|
- element.amtStd = element.amtStd?element.amtStd:0
|
|
|
+ element.priceStd = element.priceStd ? element.priceStd : 0
|
|
|
+ element.amtStd = element.amtStd ? element.amtStd : 0
|
|
|
});
|
|
|
params.orderStatus = Constants.orderStatus.STATUS_DEAL //订单状态
|
|
|
params.outStatus = Constants.outStatus.unOutBound //出库状态
|
|
|
@@ -712,7 +712,7 @@ Page({
|
|
|
* @date : 2024/2/1 15:49
|
|
|
* @author : 于继渤
|
|
|
*/
|
|
|
- setGoods(e) {
|
|
|
+ setGoods(e) {
|
|
|
//校验库存
|
|
|
let btnFormData = this.data.btnFormData ? JSON.parse(this.data.btnFormData) : ''
|
|
|
if (btnFormData.flag) {
|
|
|
@@ -776,7 +776,7 @@ Page({
|
|
|
res.invId = it.invId
|
|
|
res.invQty = it.invQty ? it.invQty : 0
|
|
|
//销售订单、销售出库、采购退货-自动出库或者办理时要读取系统参数【欠货开单】开启就不判断库存,调取后台自动生成对应入库单
|
|
|
- if (this.data.flgHandleSetting) { } else {
|
|
|
+ if (this.data.flgHandleSetting) {} else {
|
|
|
res['itemQty_max'] = res.invQty
|
|
|
}
|
|
|
res['itemQty_min'] = 1
|
|
|
@@ -815,7 +815,7 @@ Page({
|
|
|
getInventory(params) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
this.excute(this.data.commonService, this.data.commonService.getInventoryByList, params).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
resolve(res.data.data)
|
|
|
|
|
|
}
|
|
|
@@ -834,7 +834,7 @@ Page({
|
|
|
if (!formData.flgBusiness) {
|
|
|
Dialog.confirm({
|
|
|
message: '当前部门不是业务部门,请选择业务部门',
|
|
|
- }).then(() => { }).catch(() => { })
|
|
|
+ }).then(() => {}).catch(() => {})
|
|
|
|
|
|
return
|
|
|
}
|
|
|
@@ -878,7 +878,7 @@ Page({
|
|
|
if (this.data.gradeCode == Constants.gradeCode.STD) { //标准版 不显示需收款
|
|
|
let contentSaveList = this.data.contentSaveList
|
|
|
let index_receivable = contentSaveList.findIndex(it => it.code == 'receivable');
|
|
|
- if(index_receivable>=0){
|
|
|
+ if (index_receivable >= 0) {
|
|
|
contentSaveList.splice(index_receivable, 1);
|
|
|
}
|
|
|
this.setData({
|
|
|
@@ -898,41 +898,43 @@ Page({
|
|
|
if (!data.flgAutoHandle) {
|
|
|
this.setData({
|
|
|
contentSaveList: [{
|
|
|
- code: 'receivable',
|
|
|
- content: 0,
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("saleCollection")
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'factAmt',
|
|
|
- content: 0,
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("actualTotalAmount")
|
|
|
- },
|
|
|
+ code: 'receivable',
|
|
|
+ content: 0,
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("saleCollection")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'factAmt',
|
|
|
+ content: 0,
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("actualTotalAmount")
|
|
|
+ },
|
|
|
]
|
|
|
})
|
|
|
} else {
|
|
|
this.setData({
|
|
|
contentSaveList: [{
|
|
|
- code: 'flag',
|
|
|
- title: mixins.$t("saleOutBoundFlag"),
|
|
|
- type: 'checkbox'
|
|
|
- },
|
|
|
- // { code: 'need', title: mixins.$t("saleCollection"), type: 'str' },
|
|
|
- {
|
|
|
- code: 'receivable',
|
|
|
- content: 0,
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("saleCollection")
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'factAmt',
|
|
|
- content: 0,
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("actualTotalAmount")
|
|
|
- },
|
|
|
+ code: 'flag',
|
|
|
+ title: mixins.$t("saleOutBoundFlag"),
|
|
|
+ type: 'checkbox'
|
|
|
+ },
|
|
|
+ // { code: 'need', title: mixins.$t("saleCollection"), type: 'str' },
|
|
|
+ {
|
|
|
+ code: 'receivable',
|
|
|
+ content: 0,
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("saleCollection")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'factAmt',
|
|
|
+ content: 0,
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("actualTotalAmount")
|
|
|
+ },
|
|
|
],
|
|
|
- btnFormData: JSON.stringify({ flag: data.outboundProcessingFlag })
|
|
|
+ btnFormData: JSON.stringify({
|
|
|
+ flag: data.outboundProcessingFlag
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -963,16 +965,9 @@ Page({
|
|
|
if (index_receivable != -1) {
|
|
|
contentSaveList[index_receivable]['content'] = data.sumAmount
|
|
|
}
|
|
|
- //受 销售订单编辑逻辑 限制 转出库后(订单上的出库中加上已出库数量大于0 即证明有后续出库) 不能删除明细 不能修改明细金额 明细数量不能小于已转出库数量
|
|
|
- data.goodsList.forEach(element => {
|
|
|
- if (element.outingQty&&element.outQty&&(Number(element.outingQty)+Number(element.outQty))>0) {
|
|
|
- element['itemQty_max'] = 9999999999
|
|
|
- element['itemQty_min'] = Number(element.outingQty)+Number(element.outQty)
|
|
|
- element.cannotModifyFlag = true
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
this.setData({
|
|
|
cardList: cardList,
|
|
|
formData: JSON.stringify(data),
|
|
|
@@ -984,9 +979,9 @@ Page({
|
|
|
if (this.data.gradeCode == Constants.gradeCode.STD) { //标准版 不显示需收款
|
|
|
let contentSaveList = this.data.contentSaveList
|
|
|
let index_receivable = contentSaveList.findIndex(it => it.code == 'receivable');
|
|
|
- if(index_receivable>=0){
|
|
|
+ if (index_receivable >= 0) {
|
|
|
contentSaveList.splice(index_receivable, 1);
|
|
|
- }
|
|
|
+ }
|
|
|
this.setData({
|
|
|
contentSaveList: contentSaveList
|
|
|
})
|
|
|
@@ -1012,6 +1007,15 @@ Page({
|
|
|
}
|
|
|
|
|
|
formData.goodsList = res.data.data.dataItem
|
|
|
+ //受 销售订单编辑逻辑 限制 转出库后(订单上的出库中加上已出库数量大于0 即证明有后续出库) 不能删除明细 不能修改明细金额 明细数量不能小于已转出库数量
|
|
|
+ formData.goodsList.forEach(element => {
|
|
|
+ if (element.outingQty && element.outQty && (Number(element.outingQty) + Number(element.outQty)) > 0) {
|
|
|
+ element['itemQty_max'] = 9999999999
|
|
|
+ element['itemQty_min'] = Number(element.outingQty) + Number(element.outQty)
|
|
|
+ element.cannotModifyFlag = true
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
//处理主从业务员业务部门
|
|
|
if (res.data.data.staffList) {
|
|
|
let staffIds = []
|
|
|
@@ -1099,7 +1103,7 @@ Page({
|
|
|
text: app.globalData.user.orgName,
|
|
|
value: [app.globalData.user.orgId]
|
|
|
}
|
|
|
- formData.orgId = app.globalData.user.orgId
|
|
|
+ formData.orgId = app.globalData.user.orgId
|
|
|
formData.flgBusiness = app.globalData.user.flgBusiness
|
|
|
formData.orgList = [{
|
|
|
orgId: app.globalData.user.orgId,
|
|
|
@@ -1175,7 +1179,7 @@ Page({
|
|
|
element.discount = formData.discount
|
|
|
}
|
|
|
});
|
|
|
- let contentSaveList = this.data.contentSaveList
|
|
|
+ let contentSaveList = this.data.contentSaveList
|
|
|
//需收款 = 实际金额 - 使用预存
|
|
|
let amtReceivable = Number(formData.factAmt) - (formData.useCollect ? Number(formData.useCollect) : 0)
|
|
|
//组件显示 需收款
|
|
|
@@ -1208,39 +1212,39 @@ Page({
|
|
|
if (!that.data.flgAutoHandle) {
|
|
|
this.setData({
|
|
|
contentSaveList: [{
|
|
|
- code: 'receivable',
|
|
|
- content: 0,
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("saleCollection")
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'factAmt',
|
|
|
- content: 0,
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("actualTotalAmount")
|
|
|
- },
|
|
|
+ code: 'receivable',
|
|
|
+ content: 0,
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("saleCollection")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'factAmt',
|
|
|
+ content: 0,
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("actualTotalAmount")
|
|
|
+ },
|
|
|
]
|
|
|
})
|
|
|
} else {
|
|
|
this.setData({
|
|
|
- contentSaveList : [{
|
|
|
- code: 'flag',
|
|
|
- title: mixins.$t("saleOutBoundFlag"),
|
|
|
- type: 'checkbox'
|
|
|
- },
|
|
|
- // { code: 'need', title: mixins.$t("saleCollection"), type: 'str' },
|
|
|
- {
|
|
|
- code: 'receivable',
|
|
|
- content: 0,
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("saleCollection")
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'factAmt',
|
|
|
- content: 0,
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("actualTotalAmount")
|
|
|
- },
|
|
|
+ contentSaveList: [{
|
|
|
+ code: 'flag',
|
|
|
+ title: mixins.$t("saleOutBoundFlag"),
|
|
|
+ type: 'checkbox'
|
|
|
+ },
|
|
|
+ // { code: 'need', title: mixins.$t("saleCollection"), type: 'str' },
|
|
|
+ {
|
|
|
+ code: 'receivable',
|
|
|
+ content: 0,
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("saleCollection")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'factAmt',
|
|
|
+ content: 0,
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("actualTotalAmount")
|
|
|
+ },
|
|
|
],
|
|
|
btnFormData: '{\"flag\":true}'
|
|
|
})
|
|
|
@@ -1271,7 +1275,7 @@ Page({
|
|
|
}
|
|
|
|
|
|
const eventChannel = this.getOpenerEventChannel()
|
|
|
- eventChannel.on('params', function (data) {
|
|
|
+ eventChannel.on('params', function (data) {
|
|
|
if (data && data.goodsList && data.goodsList.length > 0) {
|
|
|
formData.goodsList = data.goodsList
|
|
|
that.setData({
|
|
|
@@ -1298,8 +1302,8 @@ Page({
|
|
|
if (this.data.gradeCode == Constants.gradeCode.STD) { //标准版 不显示需收款
|
|
|
let contentSaveList = this.data.contentSaveList
|
|
|
let index_receivable = contentSaveList.findIndex(it => it.code == 'receivable');
|
|
|
- if(index_receivable >= 0){
|
|
|
- if(index_receivable>=0){
|
|
|
+ if (index_receivable >= 0) {
|
|
|
+ if (index_receivable >= 0) {
|
|
|
contentSaveList.splice(index_receivable, 1);
|
|
|
}
|
|
|
this.setData({
|
|
|
@@ -1347,10 +1351,10 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 计算商品金额
|
|
|
- * @date : 2024/5/24 15:49
|
|
|
- * @author : 周兴
|
|
|
- */
|
|
|
+ * @desc : 计算商品金额
|
|
|
+ * @date : 2024/5/24 15:49
|
|
|
+ * @author : 周兴
|
|
|
+ */
|
|
|
setGoodsAmount(formData) {
|
|
|
let cardList = this.data.cardList
|
|
|
|
|
|
@@ -1413,108 +1417,108 @@ Page({
|
|
|
let contentObj = this.data.contentObj
|
|
|
if (this.data.gradeCode == Constants.gradeCode.STD) {
|
|
|
contentObj.main = [{
|
|
|
- code: 'cusName',
|
|
|
- type: 'selectIcon',
|
|
|
- urlKey: 'selectCustomers',
|
|
|
- required: true,
|
|
|
- readonly: false,
|
|
|
- title: mixins.$t('customerName')
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'cusPhone',
|
|
|
- type: 'phone',
|
|
|
- title: mixins.$t('cusPhone'),
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'addressFull',
|
|
|
- type: 'address',
|
|
|
- title: mixins.$t('addressFull'),
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'addressNo',
|
|
|
- type: 'str',
|
|
|
- required: true,
|
|
|
- title: mixins.$t('addressNo')
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'channelId',
|
|
|
- name: 'channelName',
|
|
|
- required: true,
|
|
|
- title: mixins.$t('saleChannel'),
|
|
|
- type: 'choose',
|
|
|
- urlKey: 'chooseChannel'
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'contactName',
|
|
|
- type: 'str',
|
|
|
- required: false,
|
|
|
- title: mixins.$t('contactName')
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'contactPhone',
|
|
|
- type: 'str',
|
|
|
- title: mixins.$t('cpPhone'),
|
|
|
- required: false
|
|
|
- },
|
|
|
+ code: 'cusName',
|
|
|
+ type: 'selectIcon',
|
|
|
+ urlKey: 'selectCustomers',
|
|
|
+ required: true,
|
|
|
+ readonly: false,
|
|
|
+ title: mixins.$t('customerName')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'cusPhone',
|
|
|
+ type: 'phone',
|
|
|
+ title: mixins.$t('cusPhone'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'addressFull',
|
|
|
+ type: 'address',
|
|
|
+ title: mixins.$t('addressFull'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'addressNo',
|
|
|
+ type: 'str',
|
|
|
+ required: true,
|
|
|
+ title: mixins.$t('addressNo')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'channelId',
|
|
|
+ name: 'channelName',
|
|
|
+ required: true,
|
|
|
+ title: mixins.$t('saleChannel'),
|
|
|
+ type: 'choose',
|
|
|
+ urlKey: 'chooseChannel'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'contactName',
|
|
|
+ type: 'str',
|
|
|
+ required: false,
|
|
|
+ title: mixins.$t('contactName')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'contactPhone',
|
|
|
+ type: 'str',
|
|
|
+ title: mixins.$t('cpPhone'),
|
|
|
+ required: false
|
|
|
+ },
|
|
|
|
|
|
]
|
|
|
} else if (this.data.gradeCode == Constants.gradeCode.PRO) {
|
|
|
contentObj.main = [{
|
|
|
- code: 'cusName',
|
|
|
- type: 'selectIcon',
|
|
|
- urlKey: 'selectCustomers',
|
|
|
- required: true,
|
|
|
- readonly: false,
|
|
|
- title: mixins.$t('customerName')
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'cusPhone',
|
|
|
- type: 'phone',
|
|
|
- title: mixins.$t('cusPhone'),
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'addressFull',
|
|
|
- type: 'address',
|
|
|
- title: mixins.$t('addressFull'),
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'addressNo',
|
|
|
- type: 'str',
|
|
|
- required: true,
|
|
|
- title: mixins.$t('addressNo')
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'channelId',
|
|
|
- name: 'channelName',
|
|
|
- required: true,
|
|
|
- title: mixins.$t('saleChannel'),
|
|
|
- type: 'choose',
|
|
|
- urlKey: 'chooseChannel'
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'cusFrom',
|
|
|
- name: 'cusFromName',
|
|
|
- required: false,
|
|
|
- title: mixins.$t('customerSource'),
|
|
|
- type: 'choose',
|
|
|
- urlKey: 'choosecusFrom'
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'contactName',
|
|
|
- type: 'str',
|
|
|
- required: false,
|
|
|
- title: mixins.$t('contactName')
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'contactPhone',
|
|
|
- type: 'str',
|
|
|
- title: mixins.$t('cpPhone'),
|
|
|
- required: false
|
|
|
- },
|
|
|
+ code: 'cusName',
|
|
|
+ type: 'selectIcon',
|
|
|
+ urlKey: 'selectCustomers',
|
|
|
+ required: true,
|
|
|
+ readonly: false,
|
|
|
+ title: mixins.$t('customerName')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'cusPhone',
|
|
|
+ type: 'phone',
|
|
|
+ title: mixins.$t('cusPhone'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'addressFull',
|
|
|
+ type: 'address',
|
|
|
+ title: mixins.$t('addressFull'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'addressNo',
|
|
|
+ type: 'str',
|
|
|
+ required: true,
|
|
|
+ title: mixins.$t('addressNo')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'channelId',
|
|
|
+ name: 'channelName',
|
|
|
+ required: true,
|
|
|
+ title: mixins.$t('saleChannel'),
|
|
|
+ type: 'choose',
|
|
|
+ urlKey: 'chooseChannel'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'cusFrom',
|
|
|
+ name: 'cusFromName',
|
|
|
+ required: false,
|
|
|
+ title: mixins.$t('customerSource'),
|
|
|
+ type: 'choose',
|
|
|
+ urlKey: 'choosecusFrom'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'contactName',
|
|
|
+ type: 'str',
|
|
|
+ required: false,
|
|
|
+ title: mixins.$t('contactName')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'contactPhone',
|
|
|
+ type: 'str',
|
|
|
+ title: mixins.$t('cpPhone'),
|
|
|
+ required: false
|
|
|
+ },
|
|
|
]
|
|
|
}
|
|
|
this.setData({
|