diff --git a/components.d.ts b/components.d.ts
index 9279ed7..7e78672 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -10,9 +10,8 @@ declare module '@vue/runtime-core' {
LayButton: typeof import('@layui/layui-vue')['LayButton']
LayCard: typeof import('@layui/layui-vue')['LayCard']
LayCheckbox: typeof import('@layui/layui-vue')['LayCheckbox']
+ LayCheckboxGroup: typeof import('@layui/layui-vue')['LayCheckboxGroup']
LayCol: typeof import('@layui/layui-vue')['LayCol']
- LayCollapse: typeof import('@layui/layui-vue')['LayCollapse']
- LayCollapseItem: typeof import('@layui/layui-vue')['LayCollapseItem']
LayColorPicker: typeof import('@layui/layui-vue')['LayColorPicker']
LayConfigProvider: typeof import('@layui/layui-vue')['LayConfigProvider']
LayContainer: typeof import('@layui/layui-vue')['LayContainer']
@@ -32,8 +31,6 @@ declare module '@vue/runtime-core' {
LayLogo: typeof import('@layui/layui-vue')['LayLogo']
LayMenu: typeof import('@layui/layui-vue')['LayMenu']
LayMenuItem: typeof import('@layui/layui-vue')['LayMenuItem']
- LayProgress: typeof import('@layui/layui-vue')['LayProgress']
- LayQuote: typeof import('@layui/layui-vue')['LayQuote']
LayRadio: typeof import('@layui/layui-vue')['LayRadio']
LayRow: typeof import('@layui/layui-vue')['LayRow']
LayScroll: typeof import('@layui/layui-vue')['LayScroll']
@@ -45,9 +42,6 @@ declare module '@vue/runtime-core' {
LayTab: typeof import('@layui/layui-vue')['LayTab']
LayTabItem: typeof import('@layui/layui-vue')['LayTabItem']
LayTable: typeof import('@layui/layui-vue')['LayTable']
- LayTextarea: typeof import('@layui/layui-vue')['LayTextarea']
- LayTooltip: typeof import('@layui/layui-vue')['LayTooltip']
- LayUpload: typeof import('@layui/layui-vue')['LayUpload']
LightIcon: typeof import('./src/components/LightIcon.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
diff --git a/src/views/Need/components/EditView.vue b/src/views/Need/components/EditView.vue
index 4b1ef1b..8349849 100644
--- a/src/views/Need/components/EditView.vue
+++ b/src/views/Need/components/EditView.vue
@@ -1,17 +1,23 @@
-
+
+
+
+
+
保存
-
半成品编号:
描述:
+ 固定项
+
-
-
-
@@ -76,8 +79,6 @@
.isHidden{
display: none;
}
- .isBomShow{
- }
.isBomHidden{
display: none;
}
@@ -103,10 +104,14 @@
changeInfoData
} from "/src/api/api/materialType";
import OperateLog from "./OperateLog.vue";
+ import FormulaView from "./FormulaView.vue";
+ import FreezingColumnSetting from './FreezingColumnSetting.vue';
export default {
components: {
- OperateLog
+ OperateLog,
+ FormulaView,
+ FreezingColumnSetting
},
setup() {
const dataColumn = ref([]);
@@ -133,7 +138,10 @@
const visible2 = ref(false)
const changeVisible2 = function() {
visible2.value = !visible2.value
- }
+ };
+ const showFreezingColumnSettingBox = ref(false);
+ const freezingColumnSetting = ref([]);
+ const tmpDataColumn = ref([]);
return {
dataColumn,
dataList,
@@ -148,7 +156,10 @@
isShow: false,
isBomShow :false,
visible2,
- changeVisible2
+ changeVisible2,
+ showFreezingColumnSettingBox,
+ freezingColumnSetting,
+ tmpDataColumn
};
},
props: {
@@ -258,6 +269,7 @@
this.editColumn = editColumn;
this.dataList = _data.rows;
this.dataColumn = dataColumn;
+
setTimeout(function() {
layer.close(idx);
}, 500);
@@ -344,6 +356,54 @@
layer.close(idx);
layer.msg('您没有做任何更改')
}
+ },
+ _clickFreezingColumnSetting() {
+ this.tmpDataColumn = this.dataColumn;
+ this.dataColumn = ref([]);
+ this.showFreezingColumnSettingBox = true;
+ console.log('before', this.tmpDataColumn);
+ },
+ setFreezingColumns() {
+ let freezingColumns = [];
+ if (this.freezingColumnSetting && this.freezingColumnSetting.length > 0) {
+ this.freezingColumnSetting.forEach(column => {
+ let colIndex = this.tmpDataColumn.findIndex(d => d.key === column);
+ if (colIndex >= 0) {
+ let proxyFc = this.tmpDataColumn.splice(colIndex, 1)[0];
+ const {proxy, revoke} = Proxy.revocable(proxyFc, {});
+ const fc = {...proxy};
+ revoke();
+ console.log('fc', fc);
+ if (fc) {
+ fc.fixed = "left";
+ freezingColumns.push(fc);
+ }
+ }
+ })
+ }
+
+ if (freezingColumns && freezingColumns.length > 0) {
+ for(let i=freezingColumns.length-1; i>=0; i--) {
+ this.tmpDataColumn.unshift(freezingColumns[i]);
+ }
+
+ // freezingColumns = freezingColumns.concat(this.tmpDataColumn);
+ this.dataColumn = this.tmpDataColumn;
+ console.log('after', this.dataColumn);
+ } else {
+ this.dataColumn = this.tmpDataColumn;
+ }
+ },
+ setFreezingColumnsSetting(fcs) {
+ if (fcs && fcs.length > 0) {
+ this.freezingColumnSetting = fcs;
+ // this.freezingColumnSetting = ["FTestCode", "FMaterialGroup", "FWorkCenter"];
+ this.setFreezingColumns();
+ } else {
+ this.dataColumn = this.tmpDataColumn;
+ }
+
+ this.showFreezingColumnSettingBox = false;
}
}
}
diff --git a/src/views/Need/components/FormulaView.vue b/src/views/Need/components/FormulaView.vue
new file mode 100644
index 0000000..58c751d
--- /dev/null
+++ b/src/views/Need/components/FormulaView.vue
@@ -0,0 +1,118 @@
+
+
+
+ 配方视图
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Need/components/FreezingColumnSetting.vue b/src/views/Need/components/FreezingColumnSetting.vue
new file mode 100644
index 0000000..7071ac4
--- /dev/null
+++ b/src/views/Need/components/FreezingColumnSetting.vue
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file