feat(InventoryShipmentDialog): 添加工单号字段并优化操作员获取逻辑
添加成品工单号输入字段以满足业务需求 将操作员选项从props改为组件内动态获取,提高灵活性
This commit is contained in:
@@ -36,6 +36,12 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="成品工单号" prop="workorder">
|
||||
<el-input v-model="form.workorder" placeholder="请输入成品工单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="订单号" prop="orderNo">
|
||||
<el-input v-model="form.orderNo" placeholder="请输入订单号" />
|
||||
@@ -85,13 +91,27 @@ const props = defineProps({
|
||||
locationOptions: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
operatorOptions: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
})
|
||||
|
||||
import { listUser } from '@/api/system/user.js'
|
||||
const operatorOptions = ref([])
|
||||
/**
|
||||
* 获取操作员列表
|
||||
* 调用 listUser API 获取操作员数据
|
||||
*/
|
||||
function getOperatorList() {
|
||||
try {
|
||||
listUser({ pageSize: 1000, status: 0 }).then((res) => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
operatorOptions.value = data.result
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
proxy.$modal.msgError(error.message)
|
||||
}
|
||||
}
|
||||
getOperatorList()
|
||||
// 定义emits
|
||||
const emit = defineEmits(['update:dialogVisible', 'submit', 'cancel', 'material-change', 'location-change'])
|
||||
|
||||
|
||||
@@ -53,14 +53,6 @@
|
||||
</el-col>
|
||||
</BaseDialog>
|
||||
</template>
|
||||
|
||||
/** * Inventory Storage Dialog Component * * Dialog component for handling inventory storage operations. Extends BaseDialog * and adds storage-specific fields
|
||||
and functionality. * * @component * @extends BaseDialog * @param {boolean} dialogVisible - Controls the visibility of the dialog * @param {string} title - The
|
||||
title of the dialog * @param {Object} form - The form data object * @param {number} opertype - Operation type (1: add, 2: edit, 3: view) * @param {Array}
|
||||
options - Material options for selection * @param {Array} transactionOptions - Transaction type options for selection * @param {Array} locationOptions -
|
||||
Location options for selection * * @emits {update:dialogVisible} - Emitted when dialog visibility changes * @emits {submit} - Emitted when form is submitted
|
||||
with valid data * @emits {cancel} - Emitted when dialog is cancelled * @emits {material-change} - Emitted when material selection changes * @emits
|
||||
{location-change} - Emitted when location selection changes */
|
||||
<script setup name="InventoryStorageDialog">
|
||||
import { reactive, defineProps, defineEmits } from 'vue'
|
||||
import BaseDialog from './BaseDialog.vue'
|
||||
|
||||
Reference in New Issue
Block a user