diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..01a7db2
Binary files /dev/null and b/.DS_Store differ
diff --git a/CommonInput/Barcodescan.vue b/CommonInput/Barcodescan.vue
new file mode 100644
index 0000000..852b4c7
--- /dev/null
+++ b/CommonInput/Barcodescan.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CommonInput/Compound.vue b/CommonInput/Compound.vue
index 7cc0ac7..4b30051 100644
--- a/CommonInput/Compound.vue
+++ b/CommonInput/Compound.vue
@@ -1,24 +1,25 @@
-
+
+ {{ (PopUp.find((e) => e.enName == select) || {}).lable }}
+
+
-
- {{ (PopUp.find((e) => e.enName == select) || {}).lable }}
-
-
-
-
+
+
清空
- 查询
@@ -54,7 +55,7 @@
class="compound-input"
:placeholder="placeholder"
@input="changeText('value')"
- @keydown.enter.native="Enter"
+ @keydown.enter.native="search"
>
export default {
- name:'Compound',
props: {
size: {
type: String,
default: "small",
},
default: {
- default: "imei",
+ default: null,
},
data: {
type: Array,
@@ -102,21 +102,31 @@ export default {
// 带弹出框
PopUp() {
if (!this.data) return;
- return this.data.filter((item) => item.isPopUp);
+ let arr = [];
+ arr = this.data.filter((item) => item.isPopUp && item.show);
+ if (arr && arr.length) {
+ arr.findIndex((e) => e.enName == this.select) == -1
+ ? this.$set(this, "select", arr[0].enName)
+ : "";
+ }
+ return arr;
},
},
methods: {
changeText(mark) {
- const rep = /[^\s]+/g;
- let values = "";
- if (mark == "textarea") {
- this.value = "";
- values = this._.words(this.textarea, rep).join();
- } else {
- this.textarea = "";
- values = this.value;
+ if (mark) {
+ const rep = /[^\s]+/g;
+ let values = "";
+ if (mark == "textarea") {
+ this.value = "";
+ values = this._.words(this.textarea, rep).join();
+ } else {
+ this.textarea = "";
+ values = this.value;
+ }
+ this.values = values;
}
- this.values = values;
+ this.$emit("CompoundSearch", this.select, this.values);
},
//弹出层
eject() {
@@ -124,16 +134,19 @@ export default {
},
//清除
clear() {
+ this.$set(this, "textarea", "");
+ this.$set(this, "value", "");
+ this.$set(this, "values", "");
this.disable = false;
- this.textarea = "";
},
//关闭弹出层
close() {
this.popBox = false;
},
//回车事件
- Enter() {
- console.log(this.select, this.values, "++++++this.value, imeisn");
+ search() {
+ this.close();
+ this.$emit("SearchCompound");
},
},
};
diff --git a/CommonInput/ErpEchart.vue b/CommonInput/ErpEchart.vue
index 9340590..2a4a2e5 100644
--- a/CommonInput/ErpEchart.vue
+++ b/CommonInput/ErpEchart.vue
@@ -9,7 +9,7 @@ const idGen = () => {
};
export default {
- name:'ErpEchart',
+ name:'erp_echarts',
props: {
height: {
type: String,
diff --git a/CommonInput/ErpEcharts.md b/CommonInput/ErpEcharts.md
deleted file mode 100644
index 1d58674..0000000
--- a/CommonInput/ErpEcharts.md
+++ /dev/null
@@ -1,12 +0,0 @@
-## ErpEcharts 图表封装
-> **组件名:ErpEcharts**
-> 代码块: `ErpEcharts`
-> 关联组件:`echarts`
-
-> **子组件:传参**
-> options:组件接收的参数直接去echarts图表中复制option传到组件即可
-> width: "600px",----------------------------图表宽度(选填)
-> height: "400px",----------------------------图表高度(选填)
-
-> **注意事项**
-> 循环多个图表时this.uuid必须为唯一值
diff --git a/CommonInput/MoreClass.md b/CommonInput/MoreClass.md
deleted file mode 100644
index 05e622b..0000000
--- a/CommonInput/MoreClass.md
+++ /dev/null
@@ -1,126 +0,0 @@
-## MoreClass 级联选择器弹出层
-> **组件名:MoreClass**
-> 代码块: `MoreClass`
-> 关联组件:`el-element`
-
-> **子组件:传参**
-> data:组件接收的参数默认为[] 其中classifiable等于true的时候默认到该组件
-> lable: "分类",----------------------------输入框名称(选填)
-> type: "el-select",------------------------输入框类型(el-inpit,el-selec组件没用到但最好必填)
-> enName: "cate_id",------------------------返回值与model双向绑定(必填)
-> placeholder: "请选择机器类型",-------------输入框占位文本(选填)
-> size: "small",----------------------------输入框大小(选填)
-> show: true,-------------------------------是否展示(必填)
-> filterable: true,-------------------------是否可搜索(选填)
-> clearable: true,--------------------------是否可清除(选填)
-> classifiable: true,-----------------------是否分类,使用组件必填(必填)
-> disabled: false,--------------------------是否禁用(选填)
-> loading: false,---------------------------加载效果(选填)
-> options: [],------------------------------输入框下拉的值,父组件调用接口传递
-> formLabelAlign:组件返回的参数与v-model双向绑定{}
-> disabled:组件是否禁用默认false
-> size:组件大小默认值small
-> width:组件宽度默认450
-> Title:组件最外层占位文本默认为请选择分类/品牌/型号
-> **子组件:方法**
-> SearchClass:点击查询后直接父组件中打印formLabelAlign的值
-> ClearInput:父组件绑定ref直接调用子组件ClearInput()方法,然后子组件会给父组件抛出一个resetfrom()方法,在父组件resetfrom()中清空formLabelAlign中的邦定值
-> **父组件:方法**
-> getphonetype():父组件中获取第一条分类数据
-> SelectChange():选择数据后调用 后面是处理方法其中如果不是同一个接口resetFields中的值需要改变,后续代码也要修改
-SelectChange(item) {
- const resetFields = {
- cate_id: ["brand_id", "model_id", "color_id", "rom_id"],
- brand_id: ["model_id", "color_id", "rom_id"],
- model_id: ["color_id", "rom_id"],
- };
-
- Object.entries(resetFields).forEach(([field, resetFields]) => {
- if (item.enName === field) {
- resetFields.forEach((field) => {
- this.formLabelAlign[field] = "";
- this.input.find((res) => res.enName === field).options = [];
- });
- }
- });
- /** 获取型号 颜色 容量*/
- if (item.enName == "cate_id" && this.formLabelAlign.cate_id != "") {
- this.getqualityinfo(
- { cate_id: this.formLabelAlign.cate_id },
- 1,
- "brand_id"
- );
- } else if (
- item.enName == "brand_id" &&
- this.formLabelAlign.brand_id != ""
- ) {
- this.getqualityinfo(
- {
- cate_id: this.formLabelAlign.cate_id,
- brand_id: this.formLabelAlign.brand_id,
- },
- 2,
- "model_id"
- );
- } else if (
- item.enName == "model_id" &&
- this.formLabelAlign.model_id != ""
- ) {
- this.getqualityinfo(
- {
- cate_id: this.formLabelAlign.cate_id,
- brand_id: this.formLabelAlign.brand_id,
- model_id: this.formLabelAlign.model_id,
- },
- 3,
- "color_id"
- );
- }
- },
- // 获取品牌,颜色,模型数据
- async getqualityinfo(data, val, itm) {
- this.input.forEach((item) => {
- if (item.enName == itm) {
- item.loading = true;
- }
- });
- try {
- const res = await cate_brand_list_in_stock(data);
- this.input.forEach((item) => {
- if (item.enName == itm) {
- item.loading = false;
- }
- });
- if (res.errcode !== 0) return;
- if (val == 1) {
- this.updateInputOptions("brand_id", res.datas);
- } else if (val == 2) {
- this.updateInputOptions("model_id", res.datas);
- } else {
- this.updateInputOptions("rom_id", res.datas.rom_list);
- this.updateInputOptions("color_id", res.datas.color_list);
- }
- } catch (error) {
- // 处理错误
- console.error(error);
- }
- },
- 处理数据
- updateInputOptions(enName, list) {
- const mappedList = Array.isArray(list)
- ? list.map((item) => ({ label: item.label, value: item.value }))
- : [];
- this.input.forEach((r, i) => {
- if (r.enName === enName) {
- if (
- r.enName !== "model_id" &&
- r.enName !== "cate_id" &&
- r.enName !== "brand_id"
- ) {
- this.input[i].show =
- Array.isArray(list) && list.length ? true : false;
- }
- this.input[i].options = mappedList;
- }
- });
- },
\ No newline at end of file
diff --git a/CommonInput/MoreClass.vue b/CommonInput/MoreClass.vue
index eabf1f2..1198e7e 100644
--- a/CommonInput/MoreClass.vue
+++ b/CommonInput/MoreClass.vue
@@ -1,4 +1,18 @@
-
+
+
export default {
- name:'MoreClass',
props: {
disabled: {
type: Boolean,
diff --git a/CommonInput/MoreScreen.vue b/CommonInput/MoreScreen.vue
index 6802c3f..a55a87a 100644
--- a/CommonInput/MoreScreen.vue
+++ b/CommonInput/MoreScreen.vue
@@ -15,7 +15,7 @@
+
+
+
@@ -57,8 +71,8 @@