| | |
| | | <el-select v-model="form.coalId" placeholder="请选择煤种" @change="setInfo"> |
| | | <el-option |
| | | v-for="item in coalOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | :key="item.id" |
| | | :label="item.coal" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="单价(含税)" prop="priceIncludingTax"> |
| | | <el-form-item label="单价(含税)" prop="priceIncludingTax" @change="mathProfit"> |
| | | <el-input v-model="form.priceIncludingTax" placeholder="请输入销售单价(含税)" maxlength="30" type="number" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售数量" prop="saleQuantity"> |
| | | <el-form-item label="销售数量" prop="saleQuantity" @change="mathProfit"> |
| | | <el-input v-model="form.saleQuantity" placeholder="请输入销售数量" maxlength="30" type="number" /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | |
| | | <script setup> |
| | | import {reactive, ref} from "vue"; |
| | | import {addOrEditSalesRecord, customerList, officialList} from "../../../api/salesOutbound/index.js"; |
| | | 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() |
| | |
| | | form.value.saleDate = proxy.getCurrentDate() |
| | | const [supplyRes, coalRes] = await Promise.all([ |
| | | customerList(), |
| | | getCoalInfoList(), |
| | | officialList(), |
| | | ]); |
| | | let supplyData = supplyRes.data; |
| | | let coalData = coalRes.data; |
| | | coalOptions.value = 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 |