|
|
@@ -164,9 +164,9 @@ Page({
|
|
|
}
|
|
|
let contentObj = this.data.contentObj //期初余额 编辑不可编辑
|
|
|
let index = contentObj.staff.findIndex(t => t.code == 'startAmount')
|
|
|
- if(index != -1){
|
|
|
+ if (index != -1) {
|
|
|
contentObj.staff[index].readonly = true
|
|
|
- }
|
|
|
+ }
|
|
|
//新建的时候 不显示编码 编辑的时候 显示编码
|
|
|
contentObj.main = [{
|
|
|
code: 'supCode',
|
|
|
@@ -207,14 +207,14 @@ Page({
|
|
|
title: mixins.$t("brandId"),
|
|
|
type: 'choose',
|
|
|
urlKey: 'chooseBrandy',
|
|
|
- hide:data.supType == Constants.kindCode.supplierService?true:false,
|
|
|
+ hide: data.supType == Constants.kindCode.supplierService ? true : false,
|
|
|
}, { //服务类别
|
|
|
code: 'serviceCategorie',
|
|
|
name: 'serviceCategoriesName',
|
|
|
title: mixins.$t("ServiceCategories"),
|
|
|
type: 'choose',
|
|
|
urlKey: 'chooseServiceCategory',
|
|
|
- hide:data.supType != Constants.kindCode.supplierService?true:false,
|
|
|
+ hide: data.supType != Constants.kindCode.supplierService ? true : false,
|
|
|
}, { //联系人
|
|
|
code: 'contactName',
|
|
|
type: 'textarea',
|
|
|
@@ -269,7 +269,7 @@ Page({
|
|
|
* @date : 2024/5/21 15:49
|
|
|
* @author : 周兴
|
|
|
*/
|
|
|
- handleSaveData(){
|
|
|
+ handleSaveData() {
|
|
|
// 赋值默认的供应商类别
|
|
|
this.loadInit();
|
|
|
|
|
|
@@ -293,12 +293,12 @@ Page({
|
|
|
* @author : 王英杰
|
|
|
*/
|
|
|
loadInit() {
|
|
|
+ let formType = this.data.formType;
|
|
|
// 标准版:新建供应商类型默认外协供应商,且不能点开;
|
|
|
//专业版:默认采购供应商,点开是侧拉样式不是跳页(因为不能新建);
|
|
|
let contentObj = this.data.contentObj
|
|
|
let formData = this.data.formData ? JSON.parse(this.data.formData) : {}
|
|
|
- if (this.data.gradeCode == Constants.gradeCode.STD ||
|
|
|
- this.data.formType == Constants.chooseType.outSupplier) { //标准
|
|
|
+ if (this.data.gradeCode == Constants.gradeCode.STD) { //标准
|
|
|
contentObj.main = [{ //供应商名称
|
|
|
code: 'supName',
|
|
|
type: 'textarea',
|
|
|
@@ -310,11 +310,11 @@ Page({
|
|
|
title: mixins.$t("supplierType"),
|
|
|
type: 'drop',
|
|
|
dropType: 'supType',
|
|
|
- clear:false,
|
|
|
+ clear: false,
|
|
|
// type: 'choose',
|
|
|
// urlKey: 'chooseSupplierCategory',
|
|
|
required: true,
|
|
|
- readonly: true,
|
|
|
+ readonly: (formType=='supplier' || formType=='outSupplier')?true:false,
|
|
|
changeObj: {
|
|
|
[Constants.kindCode.supplierPur]: {
|
|
|
hide: ['serviceCategorie'],
|
|
|
@@ -357,14 +357,16 @@ Page({
|
|
|
title: mixins.$t("returnAddress"),
|
|
|
}
|
|
|
]
|
|
|
- if(this.data.item && this.data.item.defaultSupplier){
|
|
|
- formData.supType = Constants.kindCode.supplierPur// "供应商类别-采购"
|
|
|
- formData.supTypeName = mixins.$t("procurementSupplier") //"采购供应商"
|
|
|
- }else{
|
|
|
- formData.supType = Constants.kindCode.supplierOutsourcing// "供应商类别-外协"
|
|
|
- formData.supTypeName = mixins.$t("outsourcingSupplier") //"外协供应商"
|
|
|
- }
|
|
|
|
|
|
+ if (formType) {
|
|
|
+ if (formType == 'supplier') {
|
|
|
+ formData.supType = Constants.kindCode.supplierPur// "供应商类别-采购"
|
|
|
+ formData.supTypeName = mixins.$t("procurementSupplier") //"采购供应商"
|
|
|
+ } else if (formType == 'outSupplier') {
|
|
|
+ formData.supType = Constants.kindCode.supplierOutsourcing// "供应商类别-外协"
|
|
|
+ formData.supTypeName = mixins.$t("outsourcingSupplier") //"外协供应商"
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if (this.data.gradeCode == Constants.gradeCode.PRO) { //专业
|
|
|
contentObj.main = [{ //供应商名称
|
|
|
code: 'supName',
|