|
|
@@ -19,13 +19,13 @@ Page({
|
|
|
data: {
|
|
|
firstFlag: true,
|
|
|
orderBy: [{
|
|
|
- "text": "可售量升序",
|
|
|
- "value": 1
|
|
|
- },
|
|
|
- {
|
|
|
- "text": "可售量降序",
|
|
|
- "value": 2
|
|
|
- }
|
|
|
+ "text": "可售量升序",
|
|
|
+ "value": 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "text": "可售量降序",
|
|
|
+ "value": 2
|
|
|
+ }
|
|
|
],
|
|
|
routeObjName: 'goodsSku',
|
|
|
dataItem: null,
|
|
|
@@ -38,30 +38,30 @@ Page({
|
|
|
catId: null,
|
|
|
active: 0,
|
|
|
popContent: [{
|
|
|
- code: 'itemQty',
|
|
|
- type: 'step',
|
|
|
- title: '数量',
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'whId',
|
|
|
- name: 'whName',
|
|
|
- title: '仓库',
|
|
|
- type: 'choose',
|
|
|
- urlKey: 'chooseWh'
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'skuSpec',
|
|
|
- title: '规格',
|
|
|
- type: 'str',
|
|
|
- readonly: true,
|
|
|
- dropType: ''
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'nonStdCode',
|
|
|
- title: '商品批次',
|
|
|
- type: 'str',
|
|
|
- },
|
|
|
+ code: 'itemQty',
|
|
|
+ type: 'step',
|
|
|
+ title: '数量',
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'whId',
|
|
|
+ name: 'whName',
|
|
|
+ title: '仓库',
|
|
|
+ type: 'choose',
|
|
|
+ urlKey: 'chooseWh'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'skuSpec',
|
|
|
+ title: '规格',
|
|
|
+ type: 'str',
|
|
|
+ readonly: true,
|
|
|
+ dropType: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'nonStdCode',
|
|
|
+ title: '商品批次',
|
|
|
+ type: 'str',
|
|
|
+ },
|
|
|
],
|
|
|
popupTopObj: [{
|
|
|
leftTitle: '库存量',
|
|
|
@@ -125,35 +125,35 @@ Page({
|
|
|
if (this.data.item == Constants.billType.sale) {
|
|
|
this.setData({
|
|
|
popContent: [{
|
|
|
- code: 'itemQty',
|
|
|
- type: 'step',
|
|
|
- title: mixins.$t("count"),
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'priceSale',
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("priceSale"),
|
|
|
- required: true,
|
|
|
- center: 'right'
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'whId',
|
|
|
- name: 'whName',
|
|
|
- title: mixins.$t("warehouseId"),
|
|
|
- type: 'choose',
|
|
|
- urlKey: 'openingInventory',
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'nonStdCode',
|
|
|
- title: mixins.$t("goodsBatch"),
|
|
|
- type: 'str',
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'flgGift',
|
|
|
- title: mixins.$t("flgGift"),
|
|
|
- type: 'checkbox',
|
|
|
- },
|
|
|
+ code: 'itemQty',
|
|
|
+ type: 'step',
|
|
|
+ title: mixins.$t("count"),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'priceSale',
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("priceSale"),
|
|
|
+ required: true,
|
|
|
+ center: 'right'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'whId',
|
|
|
+ name: 'whName',
|
|
|
+ title: mixins.$t("warehouseId"),
|
|
|
+ type: 'choose',
|
|
|
+ urlKey: 'openingInventory',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'nonStdCode',
|
|
|
+ title: mixins.$t("goodsBatch"),
|
|
|
+ type: 'str',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'flgGift',
|
|
|
+ title: mixins.$t("flgGift"),
|
|
|
+ type: 'checkbox',
|
|
|
+ },
|
|
|
]
|
|
|
})
|
|
|
}
|
|
|
@@ -162,64 +162,64 @@ Page({
|
|
|
if (this.data.item == Constants.billType.saleOut || this.data.item == Constants.billType.saleOutReturn) {
|
|
|
this.setData({
|
|
|
popContent: [{
|
|
|
- code: 'itemQty',
|
|
|
- type: 'step',
|
|
|
- title: mixins.$t("count"),
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'priceOut',
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("priceSale"),
|
|
|
- required: true,
|
|
|
- readonly: false,
|
|
|
- center: 'right'
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'whId',
|
|
|
- name: 'whName',
|
|
|
- choosePopupType: 'inventorySku',
|
|
|
- title: mixins.$t("warehouseId"),
|
|
|
- type: 'choose',
|
|
|
- urlKey: 'selectInventorySku',
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'nonStdCode',
|
|
|
- title: mixins.$t("goodsBatch"),
|
|
|
- type: 'str',
|
|
|
- },
|
|
|
+ code: 'itemQty',
|
|
|
+ type: 'step',
|
|
|
+ title: mixins.$t("count"),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'priceOut',
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("priceSale"),
|
|
|
+ required: true,
|
|
|
+ readonly: false,
|
|
|
+ center: 'right'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'whId',
|
|
|
+ name: 'whName',
|
|
|
+ choosePopupType: 'inventorySku',
|
|
|
+ title: mixins.$t("warehouseId"),
|
|
|
+ type: 'choose',
|
|
|
+ urlKey: 'selectInventorySku',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'nonStdCode',
|
|
|
+ title: mixins.$t("goodsBatch"),
|
|
|
+ type: 'str',
|
|
|
+ },
|
|
|
]
|
|
|
})
|
|
|
}
|
|
|
if (this.data.item == Constants.billType.purReturn) {
|
|
|
this.setData({
|
|
|
popContent: [{
|
|
|
- code: 'itemQty',
|
|
|
- type: 'step',
|
|
|
- title: mixins.$t("count"),
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'priceStandard',
|
|
|
- type: 'number',
|
|
|
- title: mixins.$t("pricePur"),
|
|
|
- required: true,
|
|
|
- readonly: true,
|
|
|
- center: 'right'
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'whId',
|
|
|
- name: 'whName',
|
|
|
- choosePopupType: 'inventorySku',
|
|
|
- title: mixins.$t("warehouseId"),
|
|
|
- type: 'choose',
|
|
|
- urlKey: 'selectInventorySku',
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'nonStdCode',
|
|
|
- title: mixins.$t("goodsBatch"),
|
|
|
- type: 'str',
|
|
|
- },
|
|
|
+ code: 'itemQty',
|
|
|
+ type: 'step',
|
|
|
+ title: mixins.$t("count"),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'priceStandard',
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("pricePur"),
|
|
|
+ required: true,
|
|
|
+ readonly: true,
|
|
|
+ center: 'right'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'whId',
|
|
|
+ name: 'whName',
|
|
|
+ choosePopupType: 'inventorySku',
|
|
|
+ title: mixins.$t("warehouseId"),
|
|
|
+ type: 'choose',
|
|
|
+ urlKey: 'selectInventorySku',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'nonStdCode',
|
|
|
+ title: mixins.$t("goodsBatch"),
|
|
|
+ type: 'str',
|
|
|
+ },
|
|
|
]
|
|
|
})
|
|
|
}
|
|
|
@@ -325,6 +325,19 @@ Page({
|
|
|
tableData: tableData
|
|
|
})
|
|
|
}
|
|
|
+ //处理图片
|
|
|
+ if (tableData && tableData.length > 0) {
|
|
|
+ tableData.forEach(item => {
|
|
|
+ if (item.skuImages && item.skuImages.value) {
|
|
|
+ item.skuImages.value = JSON.parse(item.skuImages.value)
|
|
|
+ console.log('item.skuImages.value', item.skuImages.value[0].url)
|
|
|
+ item['imagesUrl'] = item.skuImages.value.length > 0 ? item.skuImages.value[0].url : null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ tableData: tableData
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
if (this.data.controlFlags && this.data.controlFlags.sourcePage == "inventory-adjustment") { //库存调整 设置
|
|
|
let popContent = this.data.popContent
|
|
|
@@ -349,7 +362,7 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
if (tableData && tableData.length > 0) {
|
|
|
- tableData.forEach(element => {
|
|
|
+ tableData.forEach(element => {
|
|
|
if (element.skuImages && element.skuImages.length > 0) {
|
|
|
element.skuImages.forEach(item => {
|
|
|
item.url = config.image_url + item.path
|
|
|
@@ -374,6 +387,24 @@ Page({
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
+ * @desc : 删除已选
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
+ delChoosedGoodsItem(e) {
|
|
|
+ console.log('delChoosedGoodsItem', e)
|
|
|
+ let index = e.currentTarget.dataset.index
|
|
|
+ let choosedGoodsList = this.data.choosedGoodsList
|
|
|
+ choosedGoodsList.splice(index, 1)
|
|
|
+ this.setData({
|
|
|
+ choosedGoodsList: choosedGoodsList
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
* @desc : 获取种类
|
|
|
* @date : 2024/2/1 15:49
|
|
|
* @author : 于继渤
|
|
|
@@ -484,7 +515,7 @@ Page({
|
|
|
url: chooseRoute,
|
|
|
events: {
|
|
|
// 回调后
|
|
|
- bindData: function (data) {}
|
|
|
+ bindData: function (data) { }
|
|
|
},
|
|
|
success: function (res) {
|
|
|
let data = {
|