From e99c3b2d8f6b23a1e9663655236dd42bbdd67184 Mon Sep 17 00:00:00 2001
From: liuying <1427574514@qq.com>
Date: 周四, 25 4月 2024 11:14:34 +0800
Subject: [PATCH] css
---
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/index.vue | 1
/dev/null | 420 ----------------------------------------------------
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/addForm.vue | 8
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/editForm.vue | 8
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/addForm.vue | 8
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/editForm.vue | 8
6 files changed, 29 insertions(+), 424 deletions(-)
diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/addForm.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/addForm.vue
index c02c4a8..b24126a 100644
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/addForm.vue
+++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/addForm.vue
@@ -1,5 +1,5 @@
锘�<template>
- <a-modal title="鏂板搴撳尯淇℃伅" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
+ <a-modal title="鏂板搴撳尯淇℃伅" :width="1100" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
@cancel="handleCancel">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
@@ -148,3 +148,9 @@
}
}
</script>
+<style lang="less" scoped>
+ .ant-row.ant-form-item {
+ width: 50% !important;
+ display: inline-block;
+ }
+</style>
diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/editForm.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/editForm.vue
index 89430a3..f091b69 100644
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/editForm.vue
+++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/editForm.vue
@@ -1,5 +1,5 @@
锘�<template>
- <a-modal title="缂栬緫搴撳尯淇℃伅" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
+ <a-modal title="缂栬緫搴撳尯淇℃伅" :width="1100" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
@cancel="handleCancel">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
@@ -157,3 +157,9 @@
}
}
</script>
+<style lang="less" scoped>
+ .ant-row.ant-form-item {
+ width: 50% !important;
+ display: inline-block;
+ }
+</style>
diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/index.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/index.vue
index 0ea1661..3937741 100644
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/index.vue
+++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsArea/index.vue
@@ -832,4 +832,5 @@
button {
margin-right: 8px;
}
+
</style>
diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/addForm.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/addForm.vue
index a8c01c2..b1ed5b1 100644
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/addForm.vue
+++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/addForm.vue
@@ -1,5 +1,5 @@
锘�<template>
- <a-modal title="鏂板搴撲綅淇℃伅" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
+ <a-modal title="鏂板搴撲綅淇℃伅" :width="1100" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
@cancel="handleCancel">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
@@ -209,3 +209,9 @@
}
}
</script>
+<style lang="less" scoped>
+ .ant-row.ant-form-item {
+ width: 50% !important;
+ display: inline-block;
+ }
+</style>
\ No newline at end of file
diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/editForm.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/editForm.vue
index 8336ea2..79ab521 100644
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/editForm.vue
+++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/editForm.vue
@@ -1,7 +1,7 @@
锘�<template>
<a-modal
title="缂栬緫搴撲綅淇℃伅"
- :width="900"
+ :width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@@ -243,3 +243,9 @@
}
}
</script>
+<style lang="less" scoped>
+ .ant-row.ant-form-item {
+ width: 50% !important;
+ display: inline-block;
+ }
+</style>
\ No newline at end of file
diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsPlace/addForm.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsPlace/addForm.vue
deleted file mode 100644
index 7b9af1a..0000000
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsPlace/addForm.vue
+++ /dev/null
@@ -1,161 +0,0 @@
-锘�<template>
- <a-modal
- title="鏂板搴撲綅淇℃伅"
- :width="900"
- :visible="visible"
- :confirmLoading="confirmLoading"
- @ok="handleSubmit"
- @cancel="handleCancel">
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-form-item label="缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input placeholder="璇疯緭鍏ョ紪鐮�" v-decorator="['placecode', {rules: [{required: true, message: '璇疯緭鍏ョ紪鐮侊紒'}]}]" />
- </a-form-item>
- <a-form-item label="鎵�鍦ㄥ簱鍖�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-select style="width: 100%" placeholder="璇烽�夋嫨鎵�鍦ㄥ簱鍖�" v-decorator="['areaid', {rules: [{ required: true, message: '璇烽�夋嫨鎵�鍦ㄥ簱鍖猴紒' }]}]">
- <a-select-option v-for="(item,index) in WmsAreaData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item label="鎺�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ユ帓" style="width: 100%" v-decorator="['rowno', {rules: [{ required: true, message: '璇疯緭鍏ユ帓锛�' }]}]" :min="0"/>
- </a-form-item>
- <a-form-item label="鍒�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ垪" style="width: 100%" v-decorator="['columnno', {rules: [{ required: true, message: '璇疯緭鍏ュ垪锛�' }]}]" :min="0"/>
- </a-form-item>
- <a-form-item label="灞�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ眰" style="width: 100%" v-decorator="['layerno', {rules: [{ required: true, message: '璇疯緭鍏ュ眰锛�' }]}]" :min="0"/>
- </a-form-item>
- <a-form-item label="宸烽亾" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ贩閬�" style="width: 100%" v-decorator="['aisle', {rules: [{ required: true, message: '璇疯緭鍏ュ贩閬擄紒' }]}]" :min="0"/>
- </a-form-item>
- <a-form-item label="杩涙繁鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ヨ繘娣卞彿" style="width: 100%" v-decorator="['deepcellno']" :min="0"/>
- </a-form-item>
-
- <a-form-item label="绾垮彿" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ョ嚎鍙�" style="width: 100%" v-decorator="['line']" :min="0"/>
- </a-form-item>
- <a-form-item label="鍫嗗灈鏈哄唴閮ㄤ綅缃�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input placeholder="璇疯緭鍏ュ爢鍨涙満鍐呴儴浣嶇疆" v-decorator="['positionnoForSrm']" />
- </a-form-item>
- <a-form-item label="搴撲綅X鍧愭爣" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣峏鍧愭爣" style="width: 100%" v-decorator="['xzb']" :min="0"/>
- </a-form-item>
- <a-form-item label="搴撲綅Y鍧愭爣" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣峐鍧愭爣" style="width: 100%" v-decorator="['yzb']" :min="0"/>
- </a-form-item>
- <a-form-item label="搴撲綅Z鍧愭爣" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣峑鍧愭爣" style="width: 100%" v-decorator="['zzb']" :min="0"/>
- </a-form-item>
- <a-form-item label="搴撲綅闀垮害" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣嶉暱搴�" style="width: 100%" v-decorator="['length']" :min="0"/>
- </a-form-item>
- <a-form-item label="搴撲綅瀹藉害" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣嶅搴�" style="width: 100%" v-decorator="['width']" :min="0"/>
- </a-form-item>
- <a-form-item label="搴撲綅楂樺害" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣嶉珮搴�" style="width: 100%" v-decorator="['height']" :min="0"/>
- </a-form-item>
- <a-form-item label="鏈�澶ф壙閲�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ユ渶澶ф壙閲�" style="width: 100%" v-decorator="['maxweight']" :min="0"/>
- </a-form-item>
- <a-form-item label="搴撲綅楂樺害绾у埆" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-select style="width: 100%" placeholder="璇烽�夋嫨搴撲綅楂樺害绾у埆" v-decorator="['heightlevel']">
- <a-select-option v-for="(item,index) in heightlevelData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item label="浼樺厛绾�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ヤ紭鍏堢骇" style="width: 100%" v-decorator="['priority']" :min="0"/>
- </a-form-item>
- </a-form>
- </a-spin>
- </a-modal>
-</template>
-
-<script>
- import {
- WmsPlaceFkWmsAreaList,
- WmsPlaceAdd
- } from '@/api/modular/main/WmsPlaceManage'
- export default {
- data () {
- return {
- labelCol: {
- xs: { span: 24 },
- sm: { span: 5 }
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 15 }
- },
- WmsAreaData: [],
- visible: false,
- confirmLoading: false,
- heightlevelData: [],
- form: this.$form.createForm(this)
- }
- },
- methods: {
- WmsPlaceFkWmsAreaList() {
- WmsPlaceFkWmsAreaList().then(res => {
- this.WmsAreaData = res.data
- })
- },
- // 鍒濆鍖栨柟娉�
- add (record) {
- this.visible = true
- this.$nextTick(() => {
-
- })
- const placestatusOption = this.$options
- this.placestatusData = placestatusOption.filters['dictData']('place_status')
- const islockOption = this.$options
- this.islockData = islockOption.filters['dictData']('yes_or_no')
- const isfullOption = this.$options
- this.isfullData = isfullOption.filters['dictData']('yes_or_no')
- const hastaskdoingOption = this.$options
- this.hastaskdoingData = hastaskdoingOption.filters['dictData']('yes_or_no')
- const heightlevelOption = this.$options
- this.heightlevelData = heightlevelOption.filters['dictData']('height_level')
- this.WmsPlaceFkWmsAreaList()
- },
- /**
- * 鎻愪氦琛ㄥ崟
- */
- handleSubmit () {
- const { form: { validateFields } } = this
- this.confirmLoading = true
- validateFields((errors, values) => {
- if (!errors) {
- for (const key in values) {
- if (values[key] == null) {
- values[key] = 0
- }
- if (typeof (values[key]) === 'object') {
- values[key] = JSON.stringify(values[key])
- }
- }
- WmsPlaceAdd(values).then((res) => {
- if (res.success) {
- this.$message.success('鏂板鎴愬姛')
- this.confirmLoading = false
- this.$emit('ok', values)
- this.handleCancel()
- } else {
- this.$message.error('鏂板澶辫触锛�' + JSON.stringify(res.message))
- }
- }).finally((res) => {
- this.confirmLoading = false
- })
- } else {
- this.confirmLoading = false
- }
- })
- },
- handleCancel () {
- this.form.resetFields()
- this.visible = false
- }
- }
- }
-</script>
diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsPlace/editForm.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsPlace/editForm.vue
deleted file mode 100644
index 381b8cc..0000000
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsPlace/editForm.vue
+++ /dev/null
@@ -1,204 +0,0 @@
-锘�<template>
- <a-modal
- title="缂栬緫搴撲綅淇℃伅"
- :width="900"
- :visible="visible"
- :confirmLoading="confirmLoading"
- @ok="handleSubmit"
- @cancel="handleCancel"
- >
- <a-spin :spinning="confirmLoading">
- <a-form :form="form">
- <a-form-item label="缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input
- disabled
- placeholder="璇疯緭鍏ョ紪鐮�"
- v-decorator="['placecode', { rules: [{ required: true, message: '璇疯緭鍏ョ紪鐮侊紒' }] }]"
- />
- </a-form-item>
- <a-form-item label="鎵�鍦ㄥ簱鍖�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-select
- style="width: 100%"
- placeholder="璇烽�夋嫨鎵�鍦ㄥ簱鍖�"
- v-decorator="['areaid', { rules: [{ required: true, message: '璇烽�夋嫨鎵�鍦ㄥ簱鍖猴紒' }] }]"
- >
- <a-select-option v-for="(item, index) in WmsAreaData" :key="index" :value="item.code">{{
- item.name
- }}</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item label="鎺�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ユ帓" style="width: 100%" v-decorator="['rowno']" :min="0" />
- </a-form-item>
- <a-form-item label="鍒�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ垪" style="width: 100%" v-decorator="['columnno']" :min="0" />
- </a-form-item>
- <a-form-item label="灞�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ眰" style="width: 100%" v-decorator="['layerno']" :min="0" />
- </a-form-item>
- <a-form-item label="宸烽亾" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number
- placeholder="璇疯緭鍏ュ贩閬�"
- style="width: 100%"
- v-decorator="['aisle', { rules: [{ required: true, message: '璇疯緭鍏ュ贩閬擄紒' }] }]"
- :min="0"
- />
- </a-form-item>
- <a-form-item label="杩涙繁鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ヨ繘娣卞彿" style="width: 100%" v-decorator="['deepcellno']" :min="0" />
- </a-form-item>
- <a-form-item label="绾垮彿" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ョ嚎鍙�" style="width: 100%" v-decorator="['line']" :min="0" />
- </a-form-item>
- <a-form-item label="鍫嗗灈鏈哄唴閮ㄤ綅缃�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input placeholder="璇疯緭鍏ュ爢鍨涙満鍐呴儴浣嶇疆" v-decorator="['positionnoForSrm']" />
- </a-form-item>
- <a-form-item label="搴撲綅X鍧愭爣" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣峏鍧愭爣" style="width: 100%" v-decorator="['xzb']" :min="0" />
- </a-form-item>
- <a-form-item label="搴撲綅Y鍧愭爣" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣峐鍧愭爣" style="width: 100%" v-decorator="['yzb']" :min="0" />
- </a-form-item>
- <a-form-item label="搴撲綅Z鍧愭爣" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣峑鍧愭爣" style="width: 100%" v-decorator="['zzb']" :min="0" />
- </a-form-item>
- <a-form-item label="搴撲綅闀垮害" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣嶉暱搴�" style="width: 100%" v-decorator="['length']" :min="0" />
- </a-form-item>
- <a-form-item label="搴撲綅瀹藉害" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣嶅搴�" style="width: 100%" v-decorator="['width']" :min="0" />
- </a-form-item>
- <a-form-item label="搴撲綅楂樺害" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ュ簱浣嶉珮搴�" style="width: 100%" v-decorator="['height']" :min="0" />
- </a-form-item>
- <a-form-item label="鏈�澶ф壙閲�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ユ渶澶ф壙閲�" style="width: 100%" v-decorator="['maxweight']" :min="0" />
- </a-form-item>
- <a-form-item label="搴撲綅楂樺害绾у埆" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-select style="width: 100%" placeholder="璇烽�夋嫨搴撲綅楂樺害绾у埆" v-decorator="['heightlevel']">
- <a-select-option v-for="(item, index) in heightlevelData" :key="index" :value="item.code">{{
- item.name
- }}</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item label="浼樺厛绾�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏ヤ紭鍏堢骇" style="width: 100%" v-decorator="['priority']" :min="0" />
- </a-form-item>
- <a-form-item v-show="false"><a-input v-decorator="['id']" /></a-form-item>
- </a-form>
- </a-spin>
- </a-modal>
-</template>
-
-<script>
-import { WmsPlaceFkWmsAreaList, WmsPlaceEdit } from '@/api/modular/main/WmsPlaceManage'
-export default {
- data() {
- return {
- Id: 0,
- labelCol: {
- xs: { span: 24 },
- sm: { span: 5 }
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 15 }
- },
- record: {},
- WmsAreaData: [],
- heightlevelData: [],
- visible: false,
- confirmLoading: false,
- form: this.$form.createForm(this)
- }
- },
- methods: {
- WmsPlaceFkWmsAreaList() {
- WmsPlaceFkWmsAreaList().then((res) => {
- this.WmsAreaData = res.data
- })
- },
- // 鍒濆鍖栨柟娉�
- edit(record) {
- this.visible = true
- this.Id = record.id
- this.$nextTick(() => {})
- // 娣卞害鎷疯礉 绉婚櫎VUE鐨勭洃鍚紝闃叉INDEX椤甸潰鍊煎彉鍔�
- this.record = JSON.parse(JSON.stringify(record))
- const placestatusOption = this.$options
- this.placestatusData = placestatusOption.filters['dictData']('place_status')
- const islockOption = this.$options
- this.islockData = islockOption.filters['dictData']('yes_or_no')
- const isfullOption = this.$options
- this.isfullData = isfullOption.filters['dictData']('yes_or_no')
- const hastaskdoingOption = this.$options
- this.hastaskdoingData = hastaskdoingOption.filters['dictData']('yes_or_no')
- const heightlevelOption = this.$options
- this.heightlevelData = heightlevelOption.filters['dictData']('height_level')
- this.$nextTick(() => {
- this.form.setFieldsValue({
- id: record.id,
- placecode: record.placecode,
- areaid: record.areaid,
- rowno: record.rowno,
- columnno: record.columnno,
- layerno: record.layerno,
- deepcellno: record.deepcellno,
- aisle: record.aisle,
- line: record.line,
- positionnoForSrm: record.positionnoForSrm,
- xzb: record.xzb,
- yzb: record.yzb,
- zzb: record.zzb,
- length: record.length,
- width: record.width,
- height: record.height,
- maxweight: record.maxweight,
- heightlevel: record.heightlevel + '',
- priority: record.priority
- })
- })
- this.WmsPlaceFkWmsAreaList()
- },
- handleSubmit() {
- const {
- form: { validateFields }
- } = this
- this.confirmLoading = true
- validateFields((errors, values) => {
- if (!errors) {
- for (const key in values) {
- if (values[key] == null) continue
- if (typeof values[key] === 'object') {
- values[key] = JSON.stringify(values[key])
- this.record[key] = values[key]
- } else {
- this.record[key] = values[key]
- }
- }
- WmsPlaceEdit(this.record)
- .then((res) => {
- if (res.success) {
- this.$message.success('缂栬緫鎴愬姛')
- this.confirmLoading = false
- this.$emit('ok', this.record)
- this.handleCancel()
- } else {
- this.$message.error('缂栬緫澶辫触锛�' + JSON.stringify(res.message))
- }
- })
- .finally((res) => {
- this.confirmLoading = false
- })
- } else {
- this.confirmLoading = false
- }
- })
- },
- handleCancel() {
- this.form.resetFields()
- this.visible = false
- }
- }
-}
-</script>
diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsPlace/index.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsPlace/index.vue
deleted file mode 100644
index fdba0b8..0000000
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsPlace/index.vue
+++ /dev/null
@@ -1,420 +0,0 @@
-锘�<template>
- <div>
- <a-card :bordered="false" :bodyStyle="tstyle">
- <div class="table-page-search-wrapper" v-if="hasPerm('WmsPlace:page')">
- <a-form layout="inline">
- <a-row :gutter="48">
- <a-col :md="8" :sm="24">
- <a-form-item label="缂栫爜">
- <a-input v-model="queryParam.placecode" allow-clear placeholder="璇疯緭鍏ョ紪鐮�" />
- </a-form-item>
- </a-col>
- <a-col :md="8" :sm="24">
- <a-form-item label="鐘舵��">
- <a-select
- :allowClear="true"
- style="width: 100%"
- v-model="queryParam.placestatus"
- placeholder="璇烽�夋嫨鐘舵��"
- >
- <a-select-option v-for="(item, index) in placestatusData" :key="index" :value="item.code">{{
- item.name
- }}</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <template v-if="advanced">
- <a-col :md="8" :sm="24">
- <a-form-item label="鎵�鍦ㄥ簱鍖�">
- <a-select
- :allowClear="true"
- style="width: 100%"
- v-model="queryParam.areaId"
- placeholder="璇烽�夋嫨鎵�鍦ㄥ簱鍖�"
- >
- <a-select-option v-for="(item, index) in areaNameData" :key="index" :value="item.id">{{
- item.areaName
- }}</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="8" :sm="24">
- <a-form-item label="鏄惁閿佸畾">
- <a-select
- :allowClear="true"
- style="width: 100%"
- v-model="queryParam.islock"
- placeholder="璇烽�夋嫨鏄惁閿佸畾"
- >
- <a-select-option v-for="(item, index) in islockData" :key="index" :value="item.code">{{
- item.name
- }}</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- </template>
- <a-col :md="8" :sm="24">
- <span class="table-page-search-submitButtons">
- <a-button type="primary" @click="$refs.table.refresh(true)">鏌ヨ</a-button>
- <a-button style="margin-left: 8px" @click="() => (queryParam = {})">閲嶇疆</a-button>
- <a @click="toggleAdvanced" style="margin-left: 8px">
- {{ advanced ? '鏀惰捣' : '灞曞紑' }}
- <a-icon :type="advanced ? 'up' : 'down'" />
- </a>
- </span>
- </a-col>
- </a-row>
- </a-form>
- </div>
- </a-card>
- <a-card :bordered="false">
- <s-table
- ref="table"
- :columns="columns"
- :data="loadData"
- :scroll="{ x: 2000 }"
- :alert="true"
- :rowKey="(record) => record.id"
- :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
- >
- <template class="table-operator" slot="operator" v-if="hasPerm('WmsPlace:add')">
- <a-button
- type="primary"
- v-if="hasPerm('WmsPlace:add')"
- icon="plus"
- @click="$refs.addForm.add()"
- >鏂板</a-button
- >
- <a-button
- type="danger"
- icon="lock"
- :disabled="selectedCounldLocks.length === 0"
- @click="onMulLock"
- >鎵归噺閿佸畾</a-button
- >
- <a-button
- type="danger"
- icon="unlock"
- :disabled="selectedCounldUnLocks.length === 0"
- @click="onMulUnlock"
- >鎵归噺瑙i攣</a-button
- >
- </template>
- <span slot="placestatusscopedSlots" slot-scope="text">
- <a-tag :color="text === 1 ? '#87d068' : text === 2 ? '#2db7f5' : text === 3 ? '#D4B60F' : '#108ee9'">{{
- 'place_status' | dictType(text)
- }}</a-tag>
- </span>
- <span slot="islockscopedSlots" slot-scope="text">
- <a-tag :color="text === 1 ? '#108ee9' : 'gray'">{{ 'yes_or_no' | dictType(text) }}</a-tag>
- </span>
- <span slot="emptyContainerSlots" slot-scope="text">
- <a-tag :color="text === 1 ? '#108ee9' : 'gray'">{{ 'yes_or_no' | dictType(text) }}</a-tag>
- </span>
- <span slot="heightlevelscopedSlots" slot-scope="text">
- {{ 'height_level' | dictType(text) }}
- </span>
- <span slot="action" slot-scope="text, record">
- <a v-if="hasPerm('WmsContainer:edit')" @click="$refs.editForm.edit(record)">缂栬緫</a>
- <a-divider type="vertical" v-if="hasPerm('WmsContainer:edit') & hasPerm('WmsContainer:delete')" />
- <a-popconfirm
- v-if="hasPerm('WmsContainer:delete')"
- placement="topRight"
- title="纭鍒犻櫎锛�"
- @confirm="() => WmsPlaceDelete(record)"
- >
- <a>鍒犻櫎</a>
- </a-popconfirm>
- </span>
- </s-table>
- <add-form ref="addForm" @ok="handleOk" />
- <edit-form ref="editForm" @ok="handleOk" />
- </a-card>
- </div>
-</template>
-<script>
-import { STable } from '@/components'
-import { WmsPlacePage, WmsPlaceDelete, WmsPlaceLock, WmsPlaceUnlock } from '@/api/modular/main/WmsPlaceManage'
-import { WmsAreaList } from '@/api/modular/main/WmsAreaManage'
-import addForm from './addForm.vue'
-import editForm from './editForm.vue'
-export default {
- components: {
- STable,
- addForm,
- editForm
- },
- data() {
- return {
- advanced: false, // 楂樼骇鎼滅储 灞曞紑/鍏抽棴
- queryParam: {},
- columns: [
- {
- title: '搴撲綅缂栫爜',
- align: 'center',
- sorter: true,
- dataIndex: 'placecode'
- },
- {
- title: '搴撲綅鐘舵��',
- align: 'center',
- dataIndex: 'placestatus',
- scopedSlots: { customRender: 'placestatusscopedSlots' }
- },
- {
- title: '鎵�鍦ㄥ簱鍖�',
- align: 'center',
- customRender: (value, record) => record.wmsArea.areaName,
- dataIndex: 'areaid'
- },
- {
- title: '鎺�',
- align: 'center',
- dataIndex: 'rowno'
- },
- {
- title: '鍒�',
- align: 'center',
- dataIndex: 'columnno'
- },
- {
- title: '灞�',
- align: 'center',
- dataIndex: 'layerno'
- },
- {
- title: '杩涙繁鍙�',
- align: 'center',
- dataIndex: 'deepcellno'
- },
- {
- title: '宸烽亾',
- align: 'center',
- dataIndex: 'aisle'
- },
- {
- title: '绾垮彿',
- align: 'center',
- dataIndex: 'line'
- },
- {
- title: '鏄惁閿佸畾',
- align: 'center',
- dataIndex: 'islock',
- scopedSlots: { customRender: 'islockscopedSlots' }
- },
- {
- title: '鏄惁绌烘墭',
- align: 'center',
- dataIndex: 'emptyContainer',
- scopedSlots: { customRender: 'emptyContainerSlots' }
- },
- {
- title: '搴撲綅闀垮害(m)',
- align: 'center',
- dataIndex: 'length'
- },
- {
- title: '搴撲綅瀹藉害(m)',
- align: 'center',
- dataIndex: 'width'
- },
- {
- title: '搴撲綅楂樺害(m)',
- align: 'center',
- dataIndex: 'height'
- },
- {
- title: '搴撲綅X鍧愭爣',
- align: 'center',
- dataIndex: 'xzb'
- },
- {
- title: '搴撲綅Y鍧愭爣',
- align: 'center',
- dataIndex: 'yzb'
- },
- {
- title: '搴撲綅Z鍧愭爣',
- align: 'center',
- dataIndex: 'zzb'
- },
- {
- title: '鍫嗗灈鏈哄唴閮ㄤ綅缃�',
- align: 'center',
- dataIndex: 'positionnoForSrm'
- },
- {
- title: '鏈�澶ф壙閲�',
- align: 'center',
- dataIndex: 'maxweight'
- },
- {
- title: '搴撲綅楂樺害绛夌骇',
- align: 'center',
- dataIndex: 'heightlevel',
- scopedSlots: { customRender: 'heightlevelscopedSlots' }
- },
- {
- title: '浼樺厛绾�',
- align: 'center',
- dataIndex: 'priority'
- }
- ],
- tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
- // 鍔犺浇鏁版嵁鏂规硶 蹇呴』涓� Promise 瀵硅薄
- loadData: (parameter) => {
- return WmsPlacePage(Object.assign(parameter, this.queryParam)).then((res) => {
- res.data.rows = res.data.rows.map((_obj) => {
- _obj.placestatus = _obj.placestatus.toString()
- return _obj
- })
- // 鍓嶅彴鑾峰彇鏁版嵁骞剁紪鍐欐垚绉嶅瓙鏁版嵁鐨勬ā鏉�
- // console.log(res.data.rows[0]);
- // var ShuChu="";
- // for(var i=res.data.rows.length-1; i>=0 ; i--){
- // ShuChu+="new 搴撲綅淇℃伅{Id="+res.data.rows[i]['id']+",Aisle="+res.data.rows[i]['aisle']+",Aisleside=\""+res.data.rows[i]['aisleside']+"\",Areaid="+res.data.rows[i]['areaid']+",Columnno="+res.data.rows[i]['columnno']+",Deepcellno="+res.data.rows[i]['deepcellno']+",Hastaskdoing="+res.data.rows[i]['hastaskdoing']+",Height="+res.data.rows[i]['height']+",Heightlevel="+res.data.rows[i]['heightlevel']+",Isfull="+res.data.rows[i]['isfull']+",Islock=\""+res.data.rows[i]['islock']+"\",Layerno="+res.data.rows[i]['layerno']+",Length="+res.data.rows[i]['length']+",Line="+res.data.rows[i]['line']+",Maxweight="+res.data.rows[i]['maxweight']+",Placecode=\""+res.data.rows[i]['placecode']+"\",Placestatus="+res.data.rows[i]['placestatus']+",Priority="+res.data.rows[i]['priority']+",Rowno="+res.data.rows[i]['rowno']+",Width="+res.data.rows[i]['width']+",}"
- // }
- // console.log(ShuChu)
- return res.data
- })
- },
- placestatusData: [],
- islockData: [],
- hastaskdoingData: [],
- selectedRowKeys: [],
- selectedCounldLocks: [],
- selectedCounldUnLocks: []
- }
- },
- created() {
- if (this.hasPerm('WmsPlace:edit') || this.hasPerm('WmsPlace:delete')) {
- this.columns.push({
- title: '鎿嶄綔',
- width: '150px',
- fixed: 'right',
- align: 'center',
- dataIndex: 'action',
- scopedSlots: { customRender: 'action' }
- })
- }
- const placestatusOption = this.$options
- this.placestatusData = placestatusOption.filters['dictData']('place_status')
- const islockOption = this.$options
- this.islockData = islockOption.filters['dictData']('yes_or_no')
- const hastaskdoingOption = this.$options
- this.hastaskdoingData = hastaskdoingOption.filters['dictData']('yes_or_no')
- },
- mounted() {
- this.WmsAreaLists()
- },
- methods: {
- WmsAreaLists() {
- WmsAreaList()
- .then((d) => {
- this.areaNameData = d.data || []
- })
- .catch(() => {})
- },
- /**
- * 鏌ヨ鍙傛暟缁勮
- */
- switchingDate() {
- const obj = JSON.parse(JSON.stringify(this.queryParam))
- return obj
- },
- WmsPlaceDelete(record) {
- WmsPlaceDelete(record).then((res) => {
- if (res.success) {
- this.$message.success('鍒犻櫎鎴愬姛')
- this.$refs.table.refresh()
- } else {
- this.$message.error('鍒犻櫎澶辫触') // + res.message
- }
- })
- },
- toggleAdvanced() {
- this.advanced = !this.advanced
- },
- handleOk() {
- this.$refs.table.refresh()
- },
- onSelectChange(selectedRowKeys, selectedRows) {
- this.selectedRowKeys = selectedRowKeys
- const arr1 = []
- const arr2 = []
- selectedRows.forEach((item) => {
- if (item.islock === 1) {
- arr2.push(item.id)
- } else {
- arr1.push(item.id)
- }
- })
- this.selectedCounldLocks = arr1
- this.selectedCounldUnLocks = arr2
- },
- onMulLock() {
- this.$confirm({
- title: '纭畾瑕佽繘琛岄攣瀹氭搷浣滃悧锛�',
- okText: '纭畾',
- okType: 'danger',
- cancelText: '鍙栨秷',
- onOk: () => {
- this.handleLock((f) => {
- if (f) {
- this.$refs.table.refresh()
- }
- })
- }
- })
- },
- onMulUnlock() {
- this.$confirm({
- title: '纭畾瑕佽繘琛岃В閿佹搷浣滃悧锛�',
- okText: '纭畾',
- okType: 'danger',
- cancelText: '鍙栨秷',
- onOk: () => {
- this.handleUnlock((f) => {
- if (f) {
- this.$refs.table.refresh()
- }
- })
- }
- })
- },
- handleLock(callback) {
- this.$loading.show()
- WmsPlaceLock(this.selectedCounldLocks)
- .then(() => {
- this.$loading.hide()
- callback(true)
- })
- .catch(() => {
- this.$loading.hide()
- callback(false)
- })
- },
- handleUnlock(callback) {
- this.$loading.show()
- WmsPlaceUnlock(this.selectedCounldUnLocks)
- .then(() => {
- this.$loading.hide()
- callback(true)
- })
- .catch(() => {
- this.$loading.hide()
- callback(false)
- })
- }
- }
-}
-</script>
-<style lang="less">
-.table-operator {
- margin-bottom: 18px;
-}
-button {
- margin-right: 8px;
-}
-</style>
--
Gitblit v1.9.3