|
@@ -125,7 +125,7 @@
|
|
|
v-model="formData.manufacturerId"
|
|
|
:model-value="zzLabel"
|
|
|
placeholder="请输入制造商"
|
|
|
- @click="openCustomer"
|
|
|
+ @click="openCustomerZz"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -146,7 +146,7 @@
|
|
|
v-model="formData.supplierId"
|
|
|
placeholder="请输入供应商"
|
|
|
:model-value="supplierLabel"
|
|
|
- @click="openCustomer"
|
|
|
+ @click="openCustomerSupplier"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -326,7 +326,8 @@
|
|
|
</ContentWrap>
|
|
|
<BrandList ref="brandFormRef" @choose="brandChoose" />
|
|
|
<ModelList ref="modelFormRef" @choose="modelChoose" :brand = "formData.brand" />
|
|
|
- <CustomerList ref="customerFormRef" @choose="customerChoose" />
|
|
|
+ <CustomerList ref="customerZzFormRef" @choose="customerZzChoose" />
|
|
|
+ <CustomerList ref="customerSupplierFormRef" @choose="customerSupplierChoose" />
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
import { IotDeviceApi, IotDeviceVO } from '@/api/pms/device'
|
|
@@ -353,6 +354,7 @@ const productClassifyList = ref<Tree[]>([]) // 树形结构
|
|
|
const { delView } = useTagsViewStore() // 视图操作
|
|
|
const { params, name } = useRoute() // 查询参数
|
|
|
const { currentRoute, push } = useRouter()
|
|
|
+
|
|
|
const id = params.id
|
|
|
const isDetail = params.isDetail
|
|
|
const { t } = useI18n() // 国际化
|
|
@@ -436,13 +438,13 @@ const brandChoose = (row) => {
|
|
|
const modelChoose = (row) => {
|
|
|
formData.value.model = row.name
|
|
|
}
|
|
|
-const customerChoose = (row) => {
|
|
|
- formData.value[row.customerNature + 'Id'] = row.id
|
|
|
- if (row.customerNature == 'supplier') {
|
|
|
- supplierLabel.value = row.name
|
|
|
- } else {
|
|
|
- zzLabel.value = row.name
|
|
|
- }
|
|
|
+const customerSupplierChoose = (row) => {
|
|
|
+ formData.value.supplierId = row.id
|
|
|
+ supplierLabel.value = row.name
|
|
|
+}
|
|
|
+const customerZzChoose = (row) => {
|
|
|
+ formData.value.manufacturerId = row.id
|
|
|
+ zzLabel.value = row.name
|
|
|
}
|
|
|
/** 添加/修改操作 */
|
|
|
const brandFormRef = ref()
|
|
@@ -453,9 +455,13 @@ const modelFormRef = ref()
|
|
|
const openModelForm = () =>{
|
|
|
modelFormRef.value.open()
|
|
|
}
|
|
|
-const customerFormRef = ref()
|
|
|
-const openCustomer = () => {
|
|
|
- customerFormRef.value.open()
|
|
|
+const customerSupplierFormRef = ref()
|
|
|
+const openCustomerSupplier = () => {
|
|
|
+ customerSupplierFormRef.value.open()
|
|
|
+}
|
|
|
+const customerZzFormRef = ref()
|
|
|
+const openCustomerZz = () => {
|
|
|
+ customerZzFormRef.value.open()
|
|
|
}
|
|
|
const allshouqi = () => {
|
|
|
baseIsExpanded.value = false
|
|
@@ -495,12 +501,14 @@ const handleInput = (value, obj) => {
|
|
|
|
|
|
const close = () => {
|
|
|
delView(unref(currentRoute))
|
|
|
- push({
|
|
|
- name: 'IotDevicePms',
|
|
|
- query: {
|
|
|
- date: new Date().getTime()
|
|
|
- }
|
|
|
- })
|
|
|
+ push({ name: 'IotDevicePms', params:{}})
|
|
|
+ // delView(unref(currentRoute))
|
|
|
+ // push({
|
|
|
+ // name: 'IotDevicePms',
|
|
|
+ // query: {
|
|
|
+ // date: new Date().getTime()
|
|
|
+ // }
|
|
|
+ // })
|
|
|
}
|
|
|
const baseInfoClick = () => {
|
|
|
baseIsExpanded.value = !baseIsExpanded.value // 切换展开状态
|