|
|
@@ -18,6 +18,7 @@ Page({
|
|
|
*/
|
|
|
data: {
|
|
|
routeObjNameGoTo: 'goodsBrand',
|
|
|
+ gradeCode: app.globalData.company.gradeCode,
|
|
|
goodsBrandService: app.globalData['goodsBrandService'],
|
|
|
goodsCategoryService: app.globalData['goodsCategoryService'],
|
|
|
goodsSeriesService: app.globalData['goodsSeriesService'],
|
|
|
@@ -230,14 +231,7 @@ Page({
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- // /**
|
|
|
- // * @desc : 处理数据
|
|
|
- // * @author : 于继渤
|
|
|
- // * @date : 2024/1/26 11:46
|
|
|
- // */
|
|
|
- // handleData(data) {
|
|
|
- // this.searchData()
|
|
|
- // },
|
|
|
+
|
|
|
/**
|
|
|
* @desc : 分类切换
|
|
|
* @author : 于继渤
|
|
|
@@ -266,9 +260,10 @@ Page({
|
|
|
* @date : 2024/1/23 9:16
|
|
|
*/
|
|
|
toDetail(e) {
|
|
|
- this.setPopContent();
|
|
|
+
|
|
|
console.log(e)
|
|
|
let item = e.detail.item
|
|
|
+ this.setPopContent(item);
|
|
|
this.setData({
|
|
|
popContent: this.data.popContent,
|
|
|
showPop: true,
|
|
|
@@ -365,48 +360,117 @@ Page({
|
|
|
* @author : 于继渤
|
|
|
* @date : 2024/1/23 9:16
|
|
|
*/
|
|
|
- setPopContent() {
|
|
|
+ setPopContent(dataItem) {
|
|
|
let formDataName = this.data.formDataName
|
|
|
let popContent = this.data.popContent
|
|
|
let routeObjNameGoTo = this.data.routeObjNameGoTo
|
|
|
if (formDataName == mixins.$t('goodsBrandSys')) {//商品品牌
|
|
|
- popContent =
|
|
|
- [
|
|
|
- { code: 'brandCode', type: 'str', title: mixins.$t('brandCode'), required: false, readonly: true, },
|
|
|
- { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
|
|
|
- { code: 'shortName', type: 'str', title: mixins.$t('abbreviation'), required: false },
|
|
|
- { code: 'supplierIds', name: 'supplierNames', title: 'supplier', type: 'choose', required: true, dropType: 'supplier', required: true, urlKey: 'selectProductAttributeSuppliers', code: 'supplierIds', formMode: 'index', idKey: 'roleId', title: mixins.$t('supplier') },
|
|
|
+ if(dataItem){
|
|
|
+ if(this.data.gradeCode == Constants.gradeCode.STD){
|
|
|
|
|
|
- { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
- ]
|
|
|
+ popContent =
|
|
|
+ [
|
|
|
+ { code: 'brandCode', type: 'str', title: mixins.$t('brandCode'), required: false, readonly: true, },
|
|
|
+ { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
|
|
|
+ { code: 'shortName', type: 'str', title: mixins.$t('abbreviation'), required: false },
|
|
|
+ { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
+ ]
|
|
|
+ }else{
|
|
|
+ popContent =
|
|
|
+ [
|
|
|
+ { code: 'brandCode', type: 'str', title: mixins.$t('brandCode'), required: false, readonly: true, },
|
|
|
+ { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
|
|
|
+ { code: 'shortName', type: 'str', title: mixins.$t('abbreviation'), required: false },
|
|
|
+ { code: 'supplierIds', name: 'supplierNames', title: 'supplier', type: 'choose', required: true, dropType: 'supplier', required: true, urlKey: 'selectProductAttributeSuppliers', code: 'supplierIds', formMode: 'index', idKey: 'roleId', title: mixins.$t('supplier') },
|
|
|
+
|
|
|
+ { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ if(this.data.gradeCode == Constants.gradeCode.STD){
|
|
|
+ popContent =
|
|
|
+ [
|
|
|
+ // { code: 'brandCode', type: 'str', title: mixins.$t('brandCode'), required: false, readonly: true, },
|
|
|
+ { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
|
|
|
+ { code: 'shortName', type: 'str', title: mixins.$t('abbreviation'), required: false },
|
|
|
+
|
|
|
+
|
|
|
+ { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
+ ]
|
|
|
+ }else{
|
|
|
+ popContent =
|
|
|
+ [
|
|
|
+ // { code: 'brandCode', type: 'str', title: mixins.$t('brandCode'), required: false, readonly: true, },
|
|
|
+ { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
|
|
|
+ { code: 'shortName', type: 'str', title: mixins.$t('abbreviation'), required: false },
|
|
|
+ { code: 'supplierIds', name: 'supplierNames', title: 'supplier', type: 'choose', required: true, dropType: 'supplier', required: true, urlKey: 'selectProductAttributeSuppliers', code: 'supplierIds', formMode: 'index', idKey: 'roleId', title: mixins.$t('supplier') },
|
|
|
+
|
|
|
+ { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
routeObjNameGoTo = 'goodsBrand'
|
|
|
}
|
|
|
if (formDataName == mixins.$t('goodsCategorySys')) { //商品种类
|
|
|
- popContent =
|
|
|
+ if(dataItem){
|
|
|
+ popContent =
|
|
|
[
|
|
|
{ code: 'catCode', type: 'str', title: mixins.$t('catCode'), required: false, readonly: true, },
|
|
|
{ code: 'parentId', name: 'parentName', title: mixins.$t('parent'), type: 'choose', required: false, urlKey: 'selectProductTypes', },
|
|
|
{ code: 'catName', type: 'str', title: mixins.$t('catName'), required: true },
|
|
|
{ code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
]
|
|
|
+ }else{
|
|
|
+ popContent =
|
|
|
+ [
|
|
|
+ // { code: 'catCode', type: 'str', title: mixins.$t('catCode'), required: false, readonly: true, },
|
|
|
+ { code: 'parentId', name: 'parentName', title: mixins.$t('parent'), type: 'choose', required: false, urlKey: 'selectProductTypes', },
|
|
|
+ { code: 'catName', type: 'str', title: mixins.$t('catName'), required: true },
|
|
|
+ { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
routeObjNameGoTo = 'goodsCategory'
|
|
|
}
|
|
|
if (formDataName == mixins.$t('goodsSeriesSys')) { //商品系列
|
|
|
- popContent =
|
|
|
+ if(dataItem){
|
|
|
+ popContent =
|
|
|
[
|
|
|
{ code: 'seriesCode', type: 'str', title: mixins.$t('seriesCode'), required: false, readonly: true, },
|
|
|
{ code: 'seriesName', type: 'str', title: mixins.$t('seriesName'), required: true },
|
|
|
{ code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
]
|
|
|
+ }else{
|
|
|
+ popContent =
|
|
|
+ [
|
|
|
+ // { code: 'seriesCode', type: 'str', title: mixins.$t('seriesCode'), required: false, readonly: true, },
|
|
|
+ { code: 'seriesName', type: 'str', title: mixins.$t('seriesName'), required: true },
|
|
|
+ { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
if (formDataName == mixins.$t('unitSys')) { //计量单位
|
|
|
- popContent =
|
|
|
+ if(dataItem){
|
|
|
+ popContent =
|
|
|
[
|
|
|
{ code: 'unitCode', type: 'str', title: mixins.$t('unitCode'), required: false, readonly: true, },
|
|
|
{ code: 'unitName', type: 'str', title: mixins.$t('unitName'), required: true },
|
|
|
{ code: 'decimalPlaces', max: 6, type: 'number', sign: "", digits: 0, title: mixins.$t('decimalPlaces'), required: true, formatThousandth: false },
|
|
|
{ code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
]
|
|
|
+ }else{
|
|
|
+ popContent =
|
|
|
+ [
|
|
|
+ // { code: 'unitCode', type: 'str', title: mixins.$t('unitCode'), required: false, readonly: true, },
|
|
|
+ { code: 'unitName', type: 'str', title: mixins.$t('unitName'), required: true },
|
|
|
+ { code: 'decimalPlaces', max: 6, type: 'number', sign: "", digits: 0, title: mixins.$t('decimalPlaces'), required: true, formatThousandth: false },
|
|
|
+ { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
this.setData({
|
|
|
popContent: popContent,
|