| | |
| | | <el-select v-model="form.customerId" placeholder="请选择客户"> |
| | | <el-option |
| | | v-for="item in customerOptions" |
| | | :key="item.id" |
| | | :label="item.customerName" |
| | | :value="item.id" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-select v-model="form.coalId" placeholder="请选择煤种" @change="setInfo"> |
| | | <el-option |
| | | v-for="item in coalOptions" |
| | | :key="item.id" |
| | | :label="item.coal" |
| | | :value="item.id" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | import {reactive, ref} from "vue"; |
| | | import {addOrEditSalesRecord, customerList, officialList} from "../../../api/salesOutbound/index.js"; |
| | | import useUserStore from '@/store/modules/user' |
| | | import {getCoalInfoList, getSupplyList} from "@/api/procureMent/index.js"; |
| | | |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits() |
| | |
| | | const openDialog = async (type, row) => { |
| | | dialogVisitable.value = true |
| | | form.value.saleDate = proxy.getCurrentDate() |
| | | customerList().then((res) => { |
| | | customerOptions.value = res.data |
| | | }) |
| | | officialList().then((res) => { |
| | | coalOptions.value = res.data |
| | | }) |
| | | const [supplyRes, coalRes] = await Promise.all([ |
| | | customerList(), |
| | | getCoalInfoList(), |
| | | ]); |
| | | let supplyData = supplyRes.data; |
| | | let coalData = coalRes.data; |
| | | customerOptions.value = supplyData.map((item) => ({ |
| | | value: item.id, |
| | | label: item.customerName, |
| | | })); |
| | | coalOptions.value = coalData.map((item) => ({ |
| | | value: item.id, |
| | | label: item.coal, |
| | | })) |
| | | let res = await userStore.getInfo() |
| | | form.value.registrantId = res.user.userId |
| | | form.value.taxCoal = 13 |