|
@@ -171,7 +171,7 @@ Component({
|
|
|
// 是否只读
|
|
// 是否只读
|
|
|
readonly: {
|
|
readonly: {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
- },
|
|
|
|
|
|
|
+ },
|
|
|
titpsFlag: { //商品右上角信息
|
|
titpsFlag: { //商品右上角信息
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
value: false
|
|
value: false
|
|
@@ -284,7 +284,7 @@ Component({
|
|
|
type: String,
|
|
type: String,
|
|
|
value: '合计金额'
|
|
value: '合计金额'
|
|
|
},
|
|
},
|
|
|
- customerReadonly:{
|
|
|
|
|
|
|
+ customerReadonly: {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
value: false
|
|
value: false
|
|
|
},
|
|
},
|
|
@@ -599,15 +599,15 @@ Component({
|
|
|
} else { //外协品走
|
|
} else { //外协品走
|
|
|
// 全-免费版-销售出库-新建、编辑、详情-外协品-抽屉不展示库存量、仓库字段 商品品牌 色号
|
|
// 全-免费版-销售出库-新建、编辑、详情-外协品-抽屉不展示库存量、仓库字段 商品品牌 色号
|
|
|
popContent_sku = popContent_
|
|
popContent_sku = popContent_
|
|
|
- let whId_index = popContent_.findIndex(element => element.code == 'whId');
|
|
|
|
|
|
|
+ let whId_index = popContent_.findIndex(element => element.code == 'whId');
|
|
|
if (whId_index !== -1) {
|
|
if (whId_index !== -1) {
|
|
|
// 找到了满足条件的元素,index 是它的索引
|
|
// 找到了满足条件的元素,index 是它的索引
|
|
|
popContent_sku.splice(whId_index, 1)
|
|
popContent_sku.splice(whId_index, 1)
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
let brandName_index = popContent_.findIndex(element => element.code == 'brandName');
|
|
let brandName_index = popContent_.findIndex(element => element.code == 'brandName');
|
|
|
if (brandName_index !== -1) {
|
|
if (brandName_index !== -1) {
|
|
|
popContent_sku.splice(brandName_index, 1)
|
|
popContent_sku.splice(brandName_index, 1)
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
let nonStdCode_index = popContent_.findIndex(element => element.code == 'nonStdCode');
|
|
let nonStdCode_index = popContent_.findIndex(element => element.code == 'nonStdCode');
|
|
|
if (nonStdCode_index !== -1) {
|
|
if (nonStdCode_index !== -1) {
|
|
|
popContent_sku.splice(nonStdCode_index, 1)
|
|
popContent_sku.splice(nonStdCode_index, 1)
|
|
@@ -729,8 +729,8 @@ Component({
|
|
|
//如果设有做大值 判断 箱片的反算数量 大于 数量最大值
|
|
//如果设有做大值 判断 箱片的反算数量 大于 数量最大值
|
|
|
if (dataItem["itemQty_max"] && itemQty > dataItem["itemQty_max"]) {
|
|
if (dataItem["itemQty_max"] && itemQty > dataItem["itemQty_max"]) {
|
|
|
//那就吧 把最大值的数量换算 箱片赋值箱片
|
|
//那就吧 把最大值的数量换算 箱片赋值箱片
|
|
|
- dataItem['box'] = parseInt(Number(dataItem['itemQty']) % Number(dataItem['packBox']))
|
|
|
|
|
- dataItem['piece'] = Number(dataItem['itemQty']) % Number(dataItem['packBox'])
|
|
|
|
|
|
|
+ dataItem['box'] = parseInt(Number(dataItem['itemQty']) % Number(dataItem['packBox']))
|
|
|
|
|
+ dataItem['piece'] = Number(dataItem['itemQty']) % Number(dataItem['packBox'])
|
|
|
dataItem.packageBox = dataItem['box'] + dataItem.subUnitName + dataItem['piece'] + dataItem.unitName
|
|
dataItem.packageBox = dataItem['box'] + dataItem.subUnitName + dataItem['piece'] + dataItem.unitName
|
|
|
this.setData({
|
|
this.setData({
|
|
|
dataItem: JSON.stringify(dataItem)
|
|
dataItem: JSON.stringify(dataItem)
|
|
@@ -1260,13 +1260,13 @@ Component({
|
|
|
},
|
|
},
|
|
|
success: function (res) {
|
|
success: function (res) {
|
|
|
// 通过eventChannel向被打开页面传送数据
|
|
// 通过eventChannel向被打开页面传送数据
|
|
|
- res.eventChannel.emit('params', {
|
|
|
|
|
- choose: true,
|
|
|
|
|
- item: e.currentTarget.dataset.type ? e.currentTarget.dataset.type : _this.data.type,
|
|
|
|
|
- noWarehouseFlag: !noWarehouseFlag ? '': noWarehouseFlag,
|
|
|
|
|
- popContent: _this.data.popContent,
|
|
|
|
|
- controlFlags: _this.data.controlFlags
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ res.eventChannel.emit('params', {
|
|
|
|
|
+ choose: true,
|
|
|
|
|
+ item: e.currentTarget.dataset.type ? e.currentTarget.dataset.type : _this.data.type,
|
|
|
|
|
+ noWarehouseFlag: !noWarehouseFlag ? '' : noWarehouseFlag,
|
|
|
|
|
+ popContent: _this.data.popContent,
|
|
|
|
|
+ controlFlags: _this.data.controlFlags
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -1543,6 +1543,11 @@ Component({
|
|
|
code: ds.key
|
|
code: ds.key
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ setchooseVisible(isflag) {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ chooseVisible: isflag
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
/**
|
|
/**
|
|
|
* @desc : 修改数值输入框的值
|
|
* @desc : 修改数值输入框的值
|
|
|
* @author : 周兴
|
|
* @author : 周兴
|
|
@@ -1860,15 +1865,15 @@ Component({
|
|
|
}
|
|
}
|
|
|
let form = this.data.form
|
|
let form = this.data.form
|
|
|
// 如果删除的是外部的
|
|
// 如果删除的是外部的
|
|
|
- if(item.show == undefined || item.show){
|
|
|
|
|
|
|
+ if (item.show == undefined || item.show) {
|
|
|
let goodsList = form[this.data.itemName]
|
|
let goodsList = form[this.data.itemName]
|
|
|
- let filters = goodsList.filter(it=>it.show == false);
|
|
|
|
|
|
|
+ let filters = goodsList.filter(it => it.show == false);
|
|
|
// 需要把隐藏中的显示出来一条
|
|
// 需要把隐藏中的显示出来一条
|
|
|
- if(filters && filters.length > 0){
|
|
|
|
|
|
|
+ if (filters && filters.length > 0) {
|
|
|
filters[0].show = true;
|
|
filters[0].show = true;
|
|
|
}
|
|
}
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- form:form
|
|
|
|
|
|
|
+ form: form
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2313,11 +2318,11 @@ Component({
|
|
|
dataItem.factPrice = Number(dataItem.priceSale) * Number((Number(dataItem.discount) / 100)) //实际单价 = 销售单价*折扣
|
|
dataItem.factPrice = Number(dataItem.priceSale) * Number((Number(dataItem.discount) / 100)) //实际单价 = 销售单价*折扣
|
|
|
dataItem.factAmt = dataItem.factPrice * dataItem['itemQty'] //实际销售金额= 实际销售单价*数量
|
|
dataItem.factAmt = dataItem.factPrice * dataItem['itemQty'] //实际销售金额= 实际销售单价*数量
|
|
|
}
|
|
}
|
|
|
- if (key == "factPrice") {
|
|
|
|
|
|
|
+ if (key == "factPrice") {
|
|
|
dataItem.factPrice = e.detail.value
|
|
dataItem.factPrice = e.detail.value
|
|
|
dataItem.priceSale = e.detail.value
|
|
dataItem.priceSale = e.detail.value
|
|
|
- dataItem.factAmt = dataItem.factPrice * dataItem['itemQty']
|
|
|
|
|
- dataItem.sumPrice = dataItem.priceSale * dataItem['itemQty']
|
|
|
|
|
|
|
+ dataItem.factAmt = dataItem.factPrice * dataItem['itemQty']
|
|
|
|
|
+ dataItem.sumPrice = dataItem.priceSale * dataItem['itemQty']
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
this.setData({
|
|
this.setData({
|