Compare commits
2 Commits
master
...
c7b0740fa3
| Author | SHA1 | Date | |
|---|---|---|---|
| c7b0740fa3 | |||
| 9cc97d7585 |
Generated
+8517
-8390
File diff suppressed because it is too large
Load Diff
+14
-12
@@ -47,18 +47,20 @@ const user = {
|
||||
setToken(res.token)
|
||||
commit('SET_TOKEN', res.token)
|
||||
// 设定进销存参数 尝试同步zsw
|
||||
let params = {};
|
||||
params.currentPage = 1;
|
||||
params.pageSize = 100;
|
||||
getAction('/erp/materialProperty/list', params).then((mp) => {
|
||||
console.log(mp);
|
||||
if(mp && mp.code === 200){
|
||||
if(mp.data) {
|
||||
let thisRows = mp.data.rows; //属性列表
|
||||
Vue.ls.set('materialPropertyList', thisRows);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// let params = {};
|
||||
// params.currentPage = 1;
|
||||
// params.pageSize = 100;
|
||||
|
||||
// getAction('/erp/materialProperty/list', params).then((mp) => {
|
||||
// console.log(mp);
|
||||
// if(mp && mp.code === 200){
|
||||
// if(mp.data) {
|
||||
// let thisRows = mp.data.rows; //属性列表
|
||||
// Vue.ls.set('materialPropertyList', thisRows);
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
|
||||
@@ -297,54 +297,6 @@ export function jsExpand(options = {}) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 重复值验证工具方法
|
||||
*
|
||||
* 使用示例:
|
||||
* { validator: (rule, value, callback) => validateDuplicateValue('sys_fill_rule', 'rule_code', value, this.model.id, callback) }
|
||||
*
|
||||
* @param tableName 被验证的表名
|
||||
* @param fieldName 被验证的字段名
|
||||
* @param fieldVal 被验证的值
|
||||
* @param dataId 数据ID,可空
|
||||
* @param callback
|
||||
*/
|
||||
export function validateDuplicateValue(tableName, fieldName, fieldVal, dataId, callback) {
|
||||
if (fieldVal) {
|
||||
let params = { tableName, fieldName, fieldVal, dataId }
|
||||
api.duplicateCheck(params).then(res => {
|
||||
res['success'] ? callback() : callback(res['message'])
|
||||
}).catch(err => {
|
||||
callback(err.message || err)
|
||||
})
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编码校验规则code,校验传入的值是否合法
|
||||
*
|
||||
* 使用示例:
|
||||
* { validator: (rule, value, callback) => validateCheckRule('common', value, callback) }
|
||||
*
|
||||
* @param ruleCode 编码校验规则 code
|
||||
* @param value 被验证的值
|
||||
* @param callback
|
||||
*/
|
||||
export function validateCheckRule(ruleCode, value, callback) {
|
||||
if (ruleCode && value) {
|
||||
value = encodeURIComponent(value)
|
||||
api.checkRuleByCode({ ruleCode, value }).then(res => {
|
||||
res['success'] ? callback() : callback(res['message'])
|
||||
}).catch(err => {
|
||||
callback(err.message || err)
|
||||
})
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果值不存在就 push 进数组,反之不处理
|
||||
* @param array 要操作的数据
|
||||
|
||||
@@ -123,6 +123,15 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否隐藏">
|
||||
<el-radio-group v-model="form.hidden">
|
||||
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.INFRA_BOOLEAN_STRING)"
|
||||
:key="dict.value" :label="JSON.parse(dict.value)">{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -244,7 +253,8 @@ export default {
|
||||
icon: undefined,
|
||||
type: SystemMenuTypeEnum.DIR,
|
||||
sort: undefined,
|
||||
status: CommonStatusEnum.ENABLE
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
hidden:CommonStatusEnum.DISABLE,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
||||
+7
-7
@@ -77,13 +77,13 @@ module.exports = {
|
||||
},
|
||||
plugins: [
|
||||
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
|
||||
new CompressionPlugin({
|
||||
test: /\.(js|css|html)?$/i, // 压缩文件格式
|
||||
filename: '[path].gz[query]', // 压缩后的文件名
|
||||
algorithm: 'gzip', // 使用gzip压缩
|
||||
minRatio: 0.8, // 压缩率小于1才会压缩
|
||||
deleteOriginalAssets:true
|
||||
})
|
||||
// new CompressionPlugin({
|
||||
// test: /\.(js|css|html)?$/i, // 压缩文件格式
|
||||
// filename: '[path].gz[query]', // 压缩后的文件名
|
||||
// algorithm: 'gzip', // 使用gzip压缩
|
||||
// minRatio: 0.8, // 压缩率小于1才会压缩
|
||||
// deleteOriginalAssets:true
|
||||
// })
|
||||
],
|
||||
},
|
||||
chainWebpack(config) {
|
||||
|
||||
Reference in New Issue
Block a user