Browse Source

feat(接口): 数据同步接口测试版1.0

master
ljlong_2630 4 months ago
parent
commit
53a5e40599
  1. 18
      src/pages/sparePartsApplication/addForm.vue

18
src/pages/sparePartsApplication/addForm.vue

@ -5,6 +5,18 @@
<u-form-item label="申请主题" prop="name" required> <u-form-item label="申请主题" prop="name" required>
<u-input v-model="form.name" placeholder="请输入申请主题" /> <u-input v-model="form.name" placeholder="请输入申请主题" />
</u-form-item> </u-form-item>
<u-form-item label="成本中心" prop="costCenter" required>
<u-input v-model="form.costCenter" placeholder="请输入成本中心" />
<view class="select" @click="openSingleColumn('costCenter',form.costCenter,costCenterDept)">
<view class="input" v-if='form.costCenter'>
{{form.costCenterName}}
</view>
<view class="placeholder" v-else>
{{`请选择类型`}}
</view>
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon>
</view>
</u-form-item>
</u-form> </u-form>
<view class="list"> <view class="list">
<view class="title"> <view class="title">
@ -161,6 +173,7 @@
qty: '' qty: ''
}) })
const deviceMoldType = ref([])// const deviceMoldType = ref([])//
const costCenterDept = ref([])//
const updataKey = ref(0) const updataKey = ref(0)
// //
function submit() { function submit() {
@ -236,6 +249,10 @@
if (field.value == 'deviceNumber') { if (field.value == 'deviceNumber') {
form1.value.deviceName = e[0].label form1.value.deviceName = e[0].label
} }
if (field.value == 'costCenter') {
form.value[field.value] = e[0].value
form.value.costCenterName = e[0].label
}
getApplyDeviceList() getApplyDeviceList()
singleColumnShow.value = false singleColumnShow.value = false
@ -324,6 +341,7 @@
form.value.subList = form.value.subList form.value.subList = form.value.subList
}; };
deviceMoldType.value = await dictApi.getDict('device_mold_type') deviceMoldType.value = await dictApi.getDict('device_mold_type')
costCenterDept.value = await dictApi.getDict('center_subject_map_dept');
await getApplySparePartsList() await getApplySparePartsList()
}) })
</script> </script>

Loading…
Cancel
Save