|
|
@@ -163,10 +163,24 @@ Page({
|
|
|
let index = e.currentTarget.dataset.index
|
|
|
if (tableData[index]['isFlgCostCheck']) {
|
|
|
//已经点击补录 无法再次点击
|
|
|
+ // Dialog.alert({
|
|
|
+ // message: '补录商品中已存在',
|
|
|
+ // }).then(() => {
|
|
|
+ // }).catch(() => {
|
|
|
+ // })
|
|
|
return
|
|
|
}
|
|
|
if (tableData[index].costPrice == 0) {
|
|
|
//成本价未修改 等于0 无法点击
|
|
|
+ Dialog.alert({
|
|
|
+ message: '输入成本后才可补录',
|
|
|
+ }).then(() => {
|
|
|
+ tableData[index].focus = true
|
|
|
+ this.setData({
|
|
|
+ tableData: tableData
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
return
|
|
|
}
|
|
|
tableData[index]['isFlgCostCheck'] = true
|
|
|
@@ -192,10 +206,10 @@ Page({
|
|
|
tableData[index].itemList.forEach(res => {
|
|
|
res.costPrice = inputValue
|
|
|
res.costAmt = Number(res.intoQty * res.costPrice)
|
|
|
- if(res.outQty){
|
|
|
+ if (res.outQty) {
|
|
|
res.costAmt = Number(res.outQty * res.costPrice)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
this.setData({
|
|
|
@@ -216,7 +230,7 @@ Page({
|
|
|
choosedGoodsList[index].itemList.forEach(res => {
|
|
|
res.costPrice = inputValue
|
|
|
res.costAmt = Number(res.intoQty * res.costPrice)
|
|
|
- if(res.outQty){
|
|
|
+ if (res.outQty) {
|
|
|
res.costAmt = Number(res.outQty * res.costPrice)
|
|
|
}
|
|
|
})
|
|
|
@@ -274,7 +288,7 @@ Page({
|
|
|
*/
|
|
|
setSearchParams(params) {
|
|
|
let formData = JSON.parse(this.data.formData)
|
|
|
- params.skuIdFlag = this.data.skuIdFlag
|
|
|
+ params.skuIdFlag = this.data.skuIdFlag
|
|
|
params.intoDateStart = formData.intoDateStart ? formData.intoDateStart : this.data.dataDefaultSearch[0]
|
|
|
params.intoDateEnd = formData.intoDateEnd ? formData.intoDateEnd : this.data.dataDefaultSearch[1]
|
|
|
if (params.intoDateStart.indexOf('/') != -1) {
|
|
|
@@ -372,7 +386,7 @@ Page({
|
|
|
wx.navigateTo({
|
|
|
url: that.data.costCheckListURL,
|
|
|
events: {
|
|
|
- refresh: function (data) {}
|
|
|
+ refresh: function (data) { }
|
|
|
},
|
|
|
success: function (res) {
|
|
|
res.eventChannel.emit('params', { formMode: Constants.formMode.index })
|