diff --git a/jshERP-web/package.json b/jshERP-web/package.json
index 1ce287203..4a8353faf 100644
--- a/jshERP-web/package.json
+++ b/jshERP-web/package.json
@@ -36,7 +36,8 @@
"vue-router": "^3.0.1",
"vue-splitpane": "^1.0.4",
"vuedraggable": "^2.20.0",
- "vuex": "^3.1.0"
+ "vuex": "^3.1.0",
+ "chinese-to-pinyin": "^1.0.2"
},
"devDependencies": {
"@babel/polyfill": "^7.2.5",
diff --git a/jshERP-web/src/views/material/MaterialList.vue b/jshERP-web/src/views/material/MaterialList.vue
index a44c7adf6..cc35985ea 100644
--- a/jshERP-web/src/views/material/MaterialList.vue
+++ b/jshERP-web/src/views/material/MaterialList.vue
@@ -17,7 +17,7 @@
-
+
@@ -258,6 +258,8 @@
{title: '规格', dataIndex: 'standard', width: 120},
{title: '型号', dataIndex: 'model', width: 120},
{title: '颜色', dataIndex: 'color', width: 70, ellipsis:true},
+ {title: '品牌', dataIndex: 'brand', width: 100, ellipsis:true},
+ {title: '助记码', dataIndex: 'mnemonic', width: 80, ellipsis:true},
{title: '类别', dataIndex: 'categoryName', width: 100, ellipsis:true},
{title: '扩展信息', dataIndex: 'materialOther', width: 100, ellipsis:true},
{title: '单位', dataIndex: 'unit', width: 100, ellipsis:true,
@@ -274,6 +276,7 @@
},
{title: '基础重量', dataIndex: 'weight', width: 80},
{title: '保质期', dataIndex: 'expiryNum', width: 60},
+ {title: '制造商', dataIndex: 'mfrs', width: 120, ellipsis:true},
{title: '库存', dataIndex: 'stock', width: 80,
scopedSlots: { customRender: 'customRenderStock' }
},
diff --git a/jshERP-web/src/views/material/modules/MaterialModal.vue b/jshERP-web/src/views/material/modules/MaterialModal.vue
index 3a85963e0..39eb2c4d9 100644
--- a/jshERP-web/src/views/material/modules/MaterialModal.vue
+++ b/jshERP-web/src/views/material/modules/MaterialModal.vue
@@ -21,7 +21,7 @@
-
+
@@ -70,14 +70,14 @@
-
+
-
+
@@ -92,13 +92,13 @@
-
-
@@ -110,7 +110,7 @@
-
@@ -118,7 +118,7 @@
-
@@ -129,7 +129,7 @@
-
@@ -140,7 +140,7 @@
-
需要先录入单位才能激活
@@ -220,13 +220,6 @@
-
-
-
-
-
-
-
@@ -304,6 +297,7 @@
getMaterialAttributeValueListById, getMaxBarCode, queryMaterialCategoryTreeList } from '@/api/api'
import { removeByVal, autoJumpNextInput, handleIntroJs } from '@/utils/util'
import { getAction, httpAction } from '@/api/manage'
+ import Pinyin from 'chinese-to-pinyin'
import JImageUpload from '@/components/jeecg/JImageUpload'
import JDate from '@/components/jeecg/JDate'
import Vue from 'vue'
@@ -496,7 +490,7 @@
}, 5)
}
this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'name', 'standard', 'unit', 'unitId', 'model', 'color',
+ this.form.setFieldsValue(pick(this.model, 'name', 'standard', 'unit', 'unitId', 'model', 'color', 'brand', 'mnemonic',
'categoryId','enableSerialNumber','enableBatchNumber','position','expiryNum','weight','remark','mfrs','otherField1','otherField2','otherField3'))
autoJumpNextInput('materialHeadModal')
autoJumpNextInput('materialDetailModal')
@@ -1113,6 +1107,23 @@
}
}
},
+ handleNameChange(e) {
+ if(e.target.value) {
+ let pyArr = []
+ e.target.value.split("").forEach(w => {
+ w = w.trim()
+ if (w) {
+ if (/[\u4e00-\u9fa5]/.test(w)) {
+ let py = Pinyin(w, {removeTone: true, keepRest: true}).trim()
+ pyArr.push(py.substring(0, 1))
+ } else {
+ pyArr.push(w)
+ }
+ }
+ })
+ this.form.setFieldsValue({'mnemonic':pyArr.join("")})
+ }
+ },
onlyUnitOnChange(e) {
if(e.target.value) {
//单位有填写了之后则显示多属性的文本框