diff --git a/src/api/base/employee/employeeApi.js b/src/api/base/employee/employeeApi.js
index ffe13cc..081aa8f 100644
--- a/src/api/base/employee/employeeApi.js
+++ b/src/api/base/employee/employeeApi.js
@@ -24,5 +24,9 @@ export default {
// 获取员工详情
employeeDetail(data) {
return request('detail', data, 'get')
+ },
+ // 添加员工基本信息
+ employeeAddShort(data) {
+ return request('addShort', data, 'post')
}
}
diff --git a/src/api/base/manual-task/manualTaskApi.js b/src/api/base/manual-task/manualTaskApi.js
new file mode 100644
index 0000000..b802668
--- /dev/null
+++ b/src/api/base/manual-task/manualTaskApi.js
@@ -0,0 +1,36 @@
+import { baseRequest } from '@/utils/request'
+
+const request = (url, ...arg) => baseRequest(`/produce/manualtask/` + url, ...arg)
+
+/**
+ * 手工任务单Api接口管理器
+ *
+ * @author Luck
+ * @date 2024/08/06 16:54
+ **/
+export default {
+ // 获取手工任务单分页
+ manualTaskPage(data) {
+ return request('page', data, 'get')
+ },
+ // 获取手工任务单【详情】分页
+ manualTaskDetailPage(data) {
+ return request('/detail/page', data, 'get')
+ },
+ // 提交手工任务单表单 edit为true时为编辑,默认为新增
+ manualTaskSubmitForm(data, edit = false) {
+ return request(edit ? 'edit' : 'add', data)
+ },
+ // 提交 保存任务单 标签、备注信息
+ manualTaskSaveTag(data) {
+ return request('saveTag', data)
+ },
+ // 删除手工任务单
+ manualTaskDelete(data) {
+ return request('delete', data)
+ },
+ // 获取手工任务单详情
+ manualTaskDetail(data) {
+ return request('detail', data, 'get')
+ }
+}
diff --git a/src/api/base/manual-task/manualTaskTagApi.js b/src/api/base/manual-task/manualTaskTagApi.js
new file mode 100644
index 0000000..f849350
--- /dev/null
+++ b/src/api/base/manual-task/manualTaskTagApi.js
@@ -0,0 +1,32 @@
+import { baseRequest } from '@/utils/request'
+
+const request = (url, ...arg) => baseRequest(`/produce/manualtasktag/` + url, ...arg)
+
+/**
+ * 手工任务单标签Api接口管理器
+ *
+ * @author Luck
+ * @date 2024/08/06 18:28
+ **/
+export default {
+ // 获取手工任务单标签分页
+ manualTaskTagPage(data) {
+ return request('page', data, 'get')
+ },
+ // 获取手工任务单标签 列表
+ manualTaskTagList(data) {
+ return request('list', data, 'get')
+ },
+ // 提交手工任务单标签表单 edit为true时为编辑,默认为新增
+ manualTaskTagSubmitForm(data, edit = false) {
+ return request(edit ? 'edit' : 'add', data)
+ },
+ // 删除手工任务单标签
+ manualTaskTagDelete(data) {
+ return request('delete', data)
+ },
+ // 获取手工任务单标签详情
+ manualTaskTagDetail(data) {
+ return request('detail', data, 'get')
+ }
+}
diff --git a/src/api/production/produceTask/produceTaskApi.js b/src/api/production/produceTask/produceTaskApi.js
new file mode 100644
index 0000000..aa527ba
--- /dev/null
+++ b/src/api/production/produceTask/produceTaskApi.js
@@ -0,0 +1,28 @@
+import { baseRequest } from '@/utils/request'
+
+const request = (url, ...arg) => baseRequest(`/produce/task/` + url, ...arg)
+
+/**
+ * 生产任务单Api接口管理器
+ *
+ * @author Luck
+ * @date 2024/08/06 10:39
+ **/
+export default {
+ // 获取生产任务单分页
+ produceTaskPage(data) {
+ return request('page', data, 'get')
+ },
+ // 提交生产任务单表单 edit为true时为编辑,默认为新增
+ produceTaskSubmitForm(data, edit = false) {
+ return request(edit ? 'edit' : 'add', data)
+ },
+ // 删除生产任务单
+ produceTaskDelete(data) {
+ return request('delete', data)
+ },
+ // 获取生产任务单详情
+ produceTaskDetail(data) {
+ return request('detail', data, 'get')
+ }
+}
diff --git a/src/components/Selector/employeeSelectorPlus.vue b/src/components/Selector/employeeSelectorPlus.vue
new file mode 100644
index 0000000..0c1767d
--- /dev/null
+++ b/src/components/Selector/employeeSelectorPlus.vue
@@ -0,0 +1,401 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+ 待选择列表 {{ tableRecordNum }} 条
+
+
+
+
+
+
+
+
+
+
+ {{ $TOOL.dictTypeData('ROLE_CATEGORY', record.category) }}
+
+
+
+
+
+
+
+
+
+
+ 已选择: {{ selectedData.length }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Selector/lineSelectorPlus.vue b/src/components/Selector/lineSelectorPlus.vue
new file mode 100644
index 0000000..1b37a47
--- /dev/null
+++ b/src/components/Selector/lineSelectorPlus.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ record.number }}
+
+
+ 启用
+ 停用
+
+
+ {{ $TOOL.dictTypeData('PRODUCTION_ORGANIZATION_TYPE', record.type) }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Selector/materielSelectorPlus.vue b/src/components/Selector/materielSelectorPlus.vue
new file mode 100644
index 0000000..6779134
--- /dev/null
+++ b/src/components/Selector/materielSelectorPlus.vue
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ record.number }}
+
+
+ 启用
+ 停用
+
+
+ {{ $TOOL.dictTypeData('OFFICIAL_ACCOUNT_TYPE', record.type) }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Table/index.vue b/src/components/Table/index.vue
index 631fdbf..001fd15 100644
--- a/src/components/Table/index.vue
+++ b/src/components/Table/index.vue
@@ -121,8 +121,8 @@
typeof props.alert === 'boolean' && props.alert
? clearSelected()
: props.alert.clear && typeof props.alert.clear === 'function'
- ? props.alert.clear()
- : null
+ ? props.alert.clear()
+ : null
)
"
>
@@ -167,7 +167,7 @@
import { get } from 'lodash-es'
const slots = useSlots()
const route = useRoute()
- const emit = defineEmits(['expand', 'plusRowData', 'editRowData', 'deleteRowData'])
+ const emit = defineEmits(['expand', 'plusRowData', 'editRowData', 'deleteRowData', 'refresh'])
const renderSlots = Object.keys(slots)
const props = defineProps(
@@ -347,6 +347,7 @@
))
loadData()
getTableProps()
+ emit('refresh')
}
// 斑马纹勾选
const changeRowClass = (v) => {
diff --git a/src/hook/useFormHandler.js b/src/hook/useFormHandler.js
index b5d4966..c1eda01 100644
--- a/src/hook/useFormHandler.js
+++ b/src/hook/useFormHandler.js
@@ -7,9 +7,10 @@ import extendFieldApi from '@/api/base/extendfield/extendFieldApi'
* 使用表单处理程序封装表单的提交、初始化和回退逻辑。
* @param {Array} formItems 表单项配置,包含表单字段名、默认值等信息。
* @param {Object} api 包含表单提交和获取详情方法的对象。
+ * @param backRouter
* @returns {Object} 返回包含表单数据、提交加载状态、表单引用、提交函数等的对象。
*/
-export default function useFormHandler(formItems, api) {
+export default function useFormHandler(formItems, api, backRouter) {
// 初始化页面类型状态
const state = reactive({
PAGE_TYPE: ''
@@ -68,7 +69,7 @@ export default function useFormHandler(formItems, api) {
// 调用api提交表单数据
await api.submitForm(formDataParam, safeId)
// 提交成功后返回上一页,并关闭当前标签页
- handleBack()
+ handleBack(backRouter)
} catch (error) {
console.error('Validation error:', error)
} finally {
@@ -92,9 +93,9 @@ export default function useFormHandler(formItems, api) {
/**
* 处理返回操作,返回上一级页面并关闭当前标签页。
*/
- const handleBack = () => {
+ const handleBack = (routerPath) => {
// useTabs.close(route)
- router.push('/basicData/publicAccount') // 优化为通用的返回上一页操作
+ useTabs.close('', routerPath)
}
/**
@@ -148,24 +149,26 @@ export default function useFormHandler(formItems, api) {
if (resExtendField) {
resExtendField.forEach((item) => {
- const showValues = JSON.parse(item.showValues)
- let options = []
- showValues.forEach((value) => {
- options.push({
- value: value.name,
- label: value.name
+ if (item.showValues) {
+ const showValues = JSON.parse(item.showValues)
+ let options = []
+ showValues.forEach((value) => {
+ options.push({
+ value: value.name,
+ label: value.name
+ })
})
- })
- extendData.push({
- label: item.name,
- name: item.fieldName,
- type: item.showType,
- span: 6,
- attrs: {
- placeholder: '请输入内容',
- options
- }
- })
+ extendData.push({
+ label: item.name,
+ name: item.fieldName,
+ type: item.showType,
+ span: 6,
+ attrs: {
+ placeholder: '请输入内容',
+ options
+ }
+ })
+ }
})
extendData.forEach((item) => {
diff --git a/src/hook/useTableManagement.js b/src/hook/useTableManagement.js
index 3631f3f..521f599 100644
--- a/src/hook/useTableManagement.js
+++ b/src/hook/useTableManagement.js
@@ -7,10 +7,11 @@ import useTabs from '@/utils/useTabs'
* 列表页面表格信息 hook 封装(数据操作)
* @param apiModule 调用接口
* @param tableColumns 表格头部信息
- * @param hasPermData
+ * @param hasPermData 权限控制
+ * @param isShowAction 是否在列首添加列
* @returns {{searchFormRef: Ref>, toolConfig: {columnSetting: boolean, striped: boolean, refresh: boolean, height: boolean}, searchFormState: Ref>, tableRef: Ref>, selectedRowKeys: Ref>, columns: Ref>, options: {rowSelection: {onChange: options.rowSelection.onChange}, alert: {show: boolean, clear: options.alert.clear}}, reset: reset, loadData: (function(*): *), deleteBatchRecords: deleteBatchRecords, deleteRecord: deleteRecord}}
*/
-export function useTableManagement(apiModule = {}, tableColumns, hasPermData) {
+export function useTableManagement(apiModule = {}, tableColumns, hasPermData, isShowAction = true) {
const searchFormState = ref({})
const searchFormRef = ref(null)
const selectedRowKeys = ref([])
@@ -43,7 +44,7 @@ export function useTableManagement(apiModule = {}, tableColumns, hasPermData) {
if (hasPerm(hasPermData)) {
// 判断columns 是否有操作
const columnsFilter = columns.value.filter((item) => item.dataIndex === 'action')
- if (columnsFilter.length === 0)
+ if (columnsFilter.length === 0 && isShowAction)
columns.value.unshift({
title: '操作',
dataIndex: 'action',
diff --git a/src/layout/components/tags.vue b/src/layout/components/tags.vue
index 16abe77..162f791 100644
--- a/src/layout/components/tags.vue
+++ b/src/layout/components/tags.vue
@@ -319,7 +319,9 @@
background: none;
height: 40px;
line-height: 40px;
- transition: background-color 0.3s, color 0.3s;
+ transition:
+ background-color 0.3s,
+ color 0.3s;
padding: 0 16px;
border-radius: 0;
border: none;
@@ -440,7 +442,9 @@
position: relative;
z-index: 1;
border-radius: 10px 10px 0 0 !important;
- box-shadow: 12px 15px 0 0 var(--primary-1), -12px 15px 0 0 var(--primary-1);
+ box-shadow:
+ 12px 15px 0 0 var(--primary-1),
+ -12px 15px 0 0 var(--primary-1);
}
.snowy-radius .ant-tabs-tab-active::before {
content: '';
diff --git a/src/store/viewTags.js b/src/store/viewTags.js
index 5f5b32e..b0862cc 100644
--- a/src/store/viewTags.js
+++ b/src/store/viewTags.js
@@ -18,7 +18,7 @@ export const viewTagsStore = defineStore('viewTags', () => {
const pushViewTags = (route) => {
const target = viewTags.value.find((item) => item.path === route.path)
const isName = route.name
- if (!target) {
+ if (!target && isName) {
viewTags.value.push(route)
}
if (target) {
diff --git a/src/utils/useTabs.js b/src/utils/useTabs.js
index f23bd47..5b8a926 100644
--- a/src/utils/useTabs.js
+++ b/src/utils/useTabs.js
@@ -36,7 +36,6 @@ export default {
keepAliveStore().removeKeepLive(route.name)
const tagList = store.viewTags
const latestView = tagList.slice(-1)[0]
- console.log(latestView, 'route')
if (latestView) {
router.push(latestView)
} else {
diff --git a/src/views/productionBusiness/basicData/brand/index.vue b/src/views/productionBusiness/basicData/brand/index.vue
index b490fb6..6847ca4 100644
--- a/src/views/productionBusiness/basicData/brand/index.vue
+++ b/src/views/productionBusiness/basicData/brand/index.vue
@@ -40,8 +40,7 @@
:tool-config="options.toolConfig"
:row-selection="options.rowSelection"
:scroll="{
- x: 100,
-
+ x: 100
}"
>
diff --git a/src/views/productionBusiness/basicData/client/detail/index.vue b/src/views/productionBusiness/basicData/client/detail/index.vue
index 2483a9b..bb12cdf 100644
--- a/src/views/productionBusiness/basicData/client/detail/index.vue
+++ b/src/views/productionBusiness/basicData/client/detail/index.vue
@@ -142,12 +142,14 @@
let cityOptionsCounty = ref([])
const onChangeProvince = (value, options) => {
- console.log(options)
cityOptionsCity.value = options.children
+ formData.city = null
+ formData.county = null
}
const onChangeCity = (value, options) => {
cityOptionsCounty.value = options.children
+ formData.county = null
}
const filterOption = (input, option) => {
@@ -253,7 +255,7 @@
isUseSlot: true,
slotName: 'countySlot',
span: 8,
- rules: [required('请选择区')],
+ rules: [required('请选择区')]
},
{
name: 'address',
@@ -390,7 +392,6 @@
}
onMounted(async () => {
- console.log(1)
formRefs.value = [formRef1.value, formRef2.value]
fetchData(route.query.type).then((res) => {
if (res) {
@@ -431,6 +432,8 @@
}
})
})
+
+ // 展示 省级 数据
})
let activeKey = ref('1')
diff --git a/src/views/productionBusiness/basicData/materiel/column/materiel-column.js b/src/views/productionBusiness/basicData/materiel/column/materiel-column.js
index c4ad23c..3b90cb5 100644
--- a/src/views/productionBusiness/basicData/materiel/column/materiel-column.js
+++ b/src/views/productionBusiness/basicData/materiel/column/materiel-column.js
@@ -33,13 +33,13 @@ export const materielColumn = [
width: 150,
ellipsis: true
},
- // {
- // title: '分类',
- // dataIndex: 'name',
- // align: 'center',
- // resizable: true,
- // width: 150
- // },
+ {
+ title: '分类',
+ dataIndex: 'categoryName',
+ align: 'center',
+ resizable: true,
+ width: 150
+ },
{
title: '品牌',
dataIndex: 'brandName',
diff --git a/src/views/productionBusiness/basicData/materiel/detail/index.vue b/src/views/productionBusiness/basicData/materiel/detail/index.vue
index 0a87948..400275d 100644
--- a/src/views/productionBusiness/basicData/materiel/detail/index.vue
+++ b/src/views/productionBusiness/basicData/materiel/detail/index.vue
@@ -26,7 +26,16 @@
ref="formRef2"
/>
-
+
+
+
+
-
-
-
+
+
+
{
+ onChangeUnit(value, options, record)
+ }
+ "
/>
@@ -73,10 +86,13 @@
+
+
+
-
+
-
+
-
+
+
+ 包装比例转换
+
@@ -138,11 +157,14 @@
import materialCategoryApi from '@/api/base/material/materialCategoryApi'
import { message } from 'ant-design-vue'
import sysBrandApi from '@/api/base/brand/sysBrandApi'
+ import { notification } from 'ant-design-vue'
+
const route = useRoute()
const formRef1 = ref(null)
const formRef2 = ref(null)
const formRef3 = ref(null)
+ const formRef4 = ref(null)
let dataSource = ref([])
let unitOptions = reactive([])
@@ -152,7 +174,7 @@
let extendData = ref([]) // 扩展字段
onMounted(async () => {
- formRefs.value = [formRef1.value, formRef2.value, formRef3.value]
+ formRefs.value = [formRef1.value, formRef2.value, formRef3.value, formRef4.value]
fetchData(route.query.type).then(async (res) => {
if (res) {
productFormData.value.promoteEnabledState = res.promoteEnabledState
@@ -182,7 +204,7 @@
const packageType = tool.dictList('MATERIAL_PACKAGE_TYPE')
packageType.forEach((item) => {
dataSource.value.push({
- enabledState: 'ENABLE',
+ enabledState: 'DISABLE',
number: item.value,
type: item.label,
name: item.label,
@@ -255,6 +277,11 @@
unitOptions = res
const resFilter = res.filter((item) => item.isBase === 'YES')
if (resFilter.length > 0) formData.baseUnitId = resFilter[0].id
+
+ // 修改包装关系的默认单位
+ dataSource.value[0].unitId = resFilter[0].id
+ dataSource.value[0].productQty = null
+ dataSource.value[0].rate = resFilter[0].rate
})
}
@@ -269,7 +296,6 @@
}
// 图片上传
-
function getBase64(img, callback) {
const reader = new FileReader()
reader.addEventListener('load', () => callback(reader.result))
@@ -341,7 +367,7 @@
type: 'a-input',
span: 6,
attrs: {
- placeholder: '请输入名称',
+ placeholder: '请输入简称',
allowClear: true
}
},
@@ -351,7 +377,7 @@
type: 'a-input',
span: 6,
attrs: {
- placeholder: '请输入名称',
+ placeholder: '请输入别名',
allowClear: true
}
},
@@ -361,7 +387,7 @@
type: 'a-input',
span: 6,
attrs: {
- placeholder: '请输入名称',
+ placeholder: '请输入规格型号',
allowClear: true
}
},
@@ -370,9 +396,11 @@
name: 'packageProportion',
type: 'a-input',
span: 6,
+ rules: [required('请输入包装比例')],
attrs: {
- placeholder: '请输入名称',
- allowClear: true
+ placeholder: '请输入包装比例',
+ allowClear: true,
+ disabled: true
}
},
{
@@ -381,7 +409,7 @@
type: 'a-input',
span: 6,
attrs: {
- placeholder: '请输入名称',
+ placeholder: '请输入助记码',
allowClear: true
}
},
@@ -632,52 +660,149 @@
}
])
+ const priceFormItems = [
+ {
+ label: '生产价格:',
+ name: 'producePrice',
+ type: 'a-input',
+ span: 6,
+ rules: [required('请输入生产价格')],
+ attrs: {
+ placeholder: '请输入生产价格'
+ }
+ },
+ {
+ label: '采购价格:',
+ name: 'purchasePrice',
+ type: 'a-input-number',
+ span: 6,
+ rules: [required('请输入采购价格')],
+ attrs: {
+ placeholder: '请输入生产价格'
+ }
+ },
+ {
+ label: '统一零售价:',
+ name: 'retailPrice',
+ type: 'a-input-number',
+ span: 6,
+ rules: [required('请输入统一零售价')],
+ attrs: {
+ placeholder: '请输入生产价格'
+ }
+ }
+ ]
+
const columns = [
{
title: '启用',
dataIndex: 'enabledState',
editable: true,
- align: 'center'
+ align: 'center',
+ width: 100
},
{
title: '条码类型编码',
dataIndex: 'number',
editable: true,
- align: 'center'
+ align: 'center',
+ width: 200
},
{
title: '条码类型',
dataIndex: 'type',
editable: true,
- align: 'center'
+ align: 'center',
+ width: 200
},
{
title: '包装关系名称',
dataIndex: 'name',
editable: true,
- align: 'center'
+ align: 'center',
+ width: 200
},
{
title: '单位',
dataIndex: 'unitId',
editable: true,
- align: 'center'
+ align: 'center',
+ width: 200
+ },
+ {
+ title: '换算率',
+ dataIndex: 'rate',
+ editable: true,
+ align: 'center',
+ width: 200
},
{
title: '产品数',
dataIndex: 'productQty',
editable: true,
- align: 'center'
+ align: 'center',
+ width: 200
}
]
- const onChangeUnit = (value) => {
- const unitIdList = new Set(dataSource.value.map((item) => item.unitId))
+ const [api, contextHolder] = notification.useNotification()
+ const onChangeUnit = (value, options, record) => {
+ record.rate = options.rate
+ }
- // 更新 unitOptions 的 disabled 属性
- unitOptions.forEach((item) => {
- item.disabled = unitIdList.has(item.id)
- })
+ const handleCompute = () => {
+ const enabledStateFilter = dataSource.value.filter((item) => item.enabledState === 'ENABLE')
+ if (enabledStateFilter.length === 0)
+ return notification.error({
+ message: `包装比例转换提示`,
+ description: '当前暂无启用的包装关系,请选择要启用的包装关系'
+ })
+
+ if (enabledStateFilter.length > 0) {
+ // 验证产品数和单位不能为空
+ for (let i = 0; i < enabledStateFilter.length; i++) {
+ if (!enabledStateFilter[i].unitId || !enabledStateFilter[i].productQty)
+ return notification.error({
+ message: `包装比例转换提示`,
+ description: `已启用的条码类型编码${enabledStateFilter[i].number},单位或产品数不能为空`
+ })
+ }
+ // 验证换算率 是否按照 从大到小排序
+ for (let i = 0; i < enabledStateFilter.length - 1; i++) {
+ // 减一以避免越界
+ if (enabledStateFilter[i].rate > enabledStateFilter[i + 1].rate) {
+ // 如果当前元素小于下一个元素
+ return notification.error({
+ message: `包装比例转换提示`,
+ description: `${enabledStateFilter[i + 1].number}的换算率不能小于或等于${
+ enabledStateFilter[i].number
+ }的换算率`
+ })
+ }
+ }
+
+ let packageProportionCount = []
+ enabledStateFilter.forEach((item) => {
+ packageProportionCount.push(item.productQty * item.rate)
+ })
+
+ formData.packageProportion = calculateRatios(packageProportionCount).join(':')
+ }
+ }
+
+ function calculateRatios(arr) {
+ // 计算比率
+ const ratios = []
+
+ // 添加最大值除以自身的比率
+ ratios.push(arr[arr.length - 1] / arr[arr.length - 1])
+
+ // 添加剩余的比率
+ for (let i = arr.length - 1; i > 0; i--) {
+ ratios.push(arr[i] / arr[i - 1])
+ }
+
+ return ratios
}
const { formData, formRefs, inform, extendFormData, onSubmit, handleBack, fetchData, getExtendField } =
diff --git a/src/views/productionBusiness/basicData/materiel/index.vue b/src/views/productionBusiness/basicData/materiel/index.vue
index 21b84be..8c498d1 100644
--- a/src/views/productionBusiness/basicData/materiel/index.vue
+++ b/src/views/productionBusiness/basicData/materiel/index.vue
@@ -57,7 +57,7 @@
:tool-config="options.toolConfig"
:row-selection="options.rowSelection"
:scroll="{
- x: 100,
+ x: 100
}"
>
@@ -139,6 +139,7 @@
+
diff --git a/src/views/productionBusiness/basicData/unit/detail/UnitGroupForm.vue b/src/views/productionBusiness/basicData/unit/detail/UnitGroupForm.vue
index 9a1084b..6e0661e 100644
--- a/src/views/productionBusiness/basicData/unit/detail/UnitGroupForm.vue
+++ b/src/views/productionBusiness/basicData/unit/detail/UnitGroupForm.vue
@@ -54,10 +54,7 @@
let recordData = cloneDeep(record)
formData.value = Object.assign({}, recordData)
} else {
- formData.value.number = ''
- formData.value.name = ''
- formData.value.enabledState = 'ENABLE'
- formData.id = ''
+ formData.value = { name: '', number: '', enabledState: 'ENABLE' }
}
}
// 关闭抽屉
diff --git a/src/views/productionBusiness/basicData/unit/detail/index.vue b/src/views/productionBusiness/basicData/unit/detail/index.vue
index 19de0ee..cdba48e 100644
--- a/src/views/productionBusiness/basicData/unit/detail/index.vue
+++ b/src/views/productionBusiness/basicData/unit/detail/index.vue
@@ -1,5 +1,5 @@
-
+
保存
@@ -51,6 +51,7 @@
const formRules = {
unitGroupId: [required('请选择单位')],
name: [required('请输入名称')],
+ rate: [required('请输入换算率')],
isBase: [required('请选择是否基本单位')]
}
@@ -126,7 +127,9 @@
span: 6,
attrs: {
placeholder: '请输入换算率',
- allowClear: true
+ allowClear: true,
+ min: 1,
+ precision: 0
}
},
{
@@ -164,8 +167,12 @@
])
const { formData, formRefs, inform, extendFormData, onSubmit, handleBack, fetchData, getExtendField } =
- useFormHandler([...unitFormItems], {
- submitForm: unitApi.sysUnitSubmitForm,
- getDetail: unitApi.sysUnitDetail
- })
+ useFormHandler(
+ [...unitFormItems],
+ {
+ submitForm: unitApi.sysUnitSubmitForm,
+ getDetail: unitApi.sysUnitDetail
+ },
+ '/basicData/unit'
+ )
diff --git a/src/views/productionBusiness/basicData/unit/index.vue b/src/views/productionBusiness/basicData/unit/index.vue
index 1a2fb3f..9c84f53 100644
--- a/src/views/productionBusiness/basicData/unit/index.vue
+++ b/src/views/productionBusiness/basicData/unit/index.vue
@@ -56,6 +56,7 @@
@plusRowData="handlePlusRowData"
@editRowData="handleEditRowData"
@deleteRowData="handleDeleteRowData"
+ @refresh="handleRefresh"
:rowSelection="unitGroupRowSelection"
>
@@ -265,6 +266,10 @@
})
}
+ const handleRefresh = () => {
+ unitGroupTableRef.value.clearSelected()
+ }
+
const successful = () => {
searchFormState.value.unitGroupId = ''
tableRef.value.refresh()
diff --git a/src/views/productionBusiness/employee/personnel/detail/index.vue b/src/views/productionBusiness/employee/personnel/detail/index.vue
new file mode 100644
index 0000000..a7423dd
--- /dev/null
+++ b/src/views/productionBusiness/employee/personnel/detail/index.vue
@@ -0,0 +1,229 @@
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/productionBusiness/employee/personnel/detail/personnelCategoryForm.vue b/src/views/productionBusiness/employee/personnel/detail/personnelCategoryForm.vue
new file mode 100644
index 0000000..cf72307
--- /dev/null
+++ b/src/views/productionBusiness/employee/personnel/detail/personnelCategoryForm.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 关闭
+ 保存
+
+
+
+
+
diff --git a/src/views/productionBusiness/employee/personnel/index.vue b/src/views/productionBusiness/employee/personnel/index.vue
new file mode 100644
index 0000000..d9249b1
--- /dev/null
+++ b/src/views/productionBusiness/employee/personnel/index.vue
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+ {{ record.number }}
+
+
+ 启用
+ 停用
+
+
+ {{ $TOOL.dictTypeData('OFFICIAL_ACCOUNT_TYPE', record.type) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/productionBusiness/employee/personnelReport/detail/index.vue b/src/views/productionBusiness/employee/personnelReport/detail/index.vue
new file mode 100644
index 0000000..a6230f1
--- /dev/null
+++ b/src/views/productionBusiness/employee/personnelReport/detail/index.vue
@@ -0,0 +1,373 @@
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/productionBusiness/employee/personnelReport/detail/personnelForm.vue b/src/views/productionBusiness/employee/personnelReport/detail/personnelForm.vue
new file mode 100644
index 0000000..fff5ecd
--- /dev/null
+++ b/src/views/productionBusiness/employee/personnelReport/detail/personnelForm.vue
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 关闭
+ 保存
+
+
+
+
+
diff --git a/src/views/productionBusiness/employee/personnelReport/index.vue b/src/views/productionBusiness/employee/personnelReport/index.vue
new file mode 100644
index 0000000..c2ac84c
--- /dev/null
+++ b/src/views/productionBusiness/employee/personnelReport/index.vue
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+ {{ record.number }}
+
+
+ 启用
+ 停用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/productionBusiness/productionCenter/task/detail/index.vue b/src/views/productionBusiness/productionCenter/task/detail/index.vue
new file mode 100644
index 0000000..425aae0
--- /dev/null
+++ b/src/views/productionBusiness/productionCenter/task/detail/index.vue
@@ -0,0 +1,147 @@
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/productionBusiness/productionCenter/task/formItems/index.js b/src/views/productionBusiness/productionCenter/task/formItems/index.js
new file mode 100644
index 0000000..f942d70
--- /dev/null
+++ b/src/views/productionBusiness/productionCenter/task/formItems/index.js
@@ -0,0 +1,112 @@
+import tool from '@/utils/tool'
+import { required } from '@/utils/formRules'
+
+export const basicInfoFormItems = [
+ {
+ label: '单号:',
+ name: 'number',
+ type: 'a-input',
+ attrs: {
+ placeholder: '请输入单号',
+ allowClear: true
+ }
+ },
+ {
+ label: '计划开工日期:',
+ name: 'producePlanDate',
+ type: 'a-date-picker',
+ attrs: {
+ placeholder: '请输入计划开工日期',
+ allowClear: true,
+ valueFormat: 'YYYY-MM-DD HH:mm:ss'
+ }
+ },
+ {
+ label: '生产类型:',
+ name: 'produceType',
+ type: 'a-select',
+ attrs: {
+ placeholder: '请输入生产类型',
+ allowClear: true,
+ options: tool.dictList('PRODUCE_TYPE')
+ }
+ },
+ {
+ label: '产品(物料):',
+ name: 'productName',
+ type: 'a-input',
+ isUseSlot: true,
+ slotName: 'productNameSlot',
+ attrs: {
+ placeholder: '请输入物料'
+ }
+ },
+ {
+ label: '批次:',
+ name: 'aesKey',
+ type: 'a-input',
+ attrs: {
+ placeholder: '请输入签名方式',
+ allowClear: true
+ }
+ },
+ {
+ label: '计划生产数量:',
+ name: 'producePlanAmount',
+ type: 'a-input-number',
+ attrs: {
+ placeholder: '请输入签名方式',
+ allowClear: true
+ }
+ },
+ {
+ label: '生产单位:', // 采购单位
+ name: 'produceUnitName',
+ isUseSlot: true,
+ slotName: 'produceUnitNameSlot',
+ attrs: {
+ placeholder: '请选择生产单位',
+ allowClear: true,
+ fieldNames: {
+ children: 'children',
+ label: 'name',
+ value: 'id'
+ }
+ }
+ },
+ {
+ label: '基本单位:',
+ name: 'baseUnitName',
+ isUseSlot: true,
+ slotName: 'baseUnitNameSlot',
+ attrs: {
+ placeholder: '请选择基本单位',
+ allowClear: true,
+ fieldNames: {
+ children: 'children',
+ label: 'name',
+ value: 'id'
+ }
+ }
+ },
+ {
+ label: '生产线:',
+ name: 'productionLineName',
+ isUseSlot: true,
+ slotName: 'productionLineNameSlot',
+ attrs: {
+ placeholder: '请选择生产线',
+ allowClear: true
+ }
+ },
+ {
+ label: '备注:',
+ name: 'aesKey',
+ type: 'a-textarea',
+ span: 24,
+ attrs: {
+ placeholder: '请输入签名方式',
+ allowClear: true
+ }
+ }
+]
diff --git a/src/views/productionBusiness/productionCenter/task/index.vue b/src/views/productionBusiness/productionCenter/task/index.vue
new file mode 100644
index 0000000..634025f
--- /dev/null
+++ b/src/views/productionBusiness/productionCenter/task/index.vue
@@ -0,0 +1,241 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+ {{ record.number }}
+
+
+ 启用
+ 停用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+