Merge remote-tracking branch 'origin/dev_New' into dev_New
| | |
| | | }); |
| | | } |
| | | |
| | | export function getProductRecordById(params) { |
| | | // export function getProductRecordById(params) { |
| | | // return request({ |
| | | // url: "/purchase/registration/getProductRecordById", |
| | | // method: "get", |
| | | // params: params, |
| | | // }); |
| | | // } |
| | | export function getProductRecordById(data) { |
| | | return request({ |
| | | url: "/purchase/registration/getProductRecordById", |
| | | method: "get", |
| | | params: params, |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >搜索</el-button |
| | | > |
| | | <el-button @click="handleReset" style="margin-left: 10px">重置</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button @click="handleOut">导出</el-button> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {onMounted, ref} from "vue"; |
| | | import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue"; |
| | | import {ElMessageBox, ElMessage} from "element-plus"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | import CalibrationDia from "@/views/equipmentManagement/measurementEquipment/components/calibrationDia.vue"; |
| | |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | |
| | | // 重置搜索条件 |
| | | const handleReset = () => { |
| | | searchForm.value.recordDate = ""; |
| | | searchForm.value.entryDate = ""; |
| | | searchForm.value.code = ""; |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {reactive, ref} from "vue"; |
| | | import {reactive, ref, getCurrentInstance, toRefs} from "vue"; |
| | | import useUserStore from '@/store/modules/user' |
| | | import {addOrEditTimingTask} from "@/api/inspectionManagement/index.js"; |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | |
| | | rules: { |
| | | taskId: [{ required: true, message: "请选择设备", trigger: "change" },], |
| | | inspector: [{ required: true, message: "请输入巡检人", trigger: "blur" },], |
| | | dateStr: [{ required: true, message: "请选择登记时间", trigger: "change" }] |
| | | dateStr: [{ required: true, message: "请选择登记时间", trigger: "change" }], |
| | | frequencyType: [{ required: true, message: "请选择任务频率", trigger: "change" }], |
| | | frequencyDetail: [ |
| | | { |
| | | required: true, |
| | | message: "请选择日期", |
| | | trigger: "change", |
| | | validator: (rule, value, callback) => { |
| | | if (!form.value.frequencyType) { |
| | | callback() |
| | | return |
| | | } |
| | | if (form.value.frequencyType === 'WEEKLY') { |
| | | if (!form.value.week || !form.value.time) { |
| | | callback(new Error("请选择日期和时间")) |
| | | } else { |
| | | callback() |
| | | } |
| | | } else { |
| | | if (!value) { |
| | | callback(new Error("请选择日期")) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | week: [ |
| | | { |
| | | required: true, |
| | | message: "请选择星期", |
| | | trigger: "change", |
| | | validator: (rule, value, callback) => { |
| | | if (form.value.frequencyType === 'WEEKLY' && !value) { |
| | | callback(new Error("请选择星期")) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | time: [ |
| | | { |
| | | required: true, |
| | | message: "请选择时间", |
| | | trigger: "change", |
| | | validator: (rule, value, callback) => { |
| | | if (form.value.frequencyType === 'WEEKLY' && !value) { |
| | | callback(new Error("请选择时间")) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | }) |
| | | const { form, rules } = toRefs(data) |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :inline="true" :model="queryParams" class="search-form"> |
| | | <el-form-item label="搜索"> |
| | | <el-form-item label="巡检任务名称"> |
| | | <el-input |
| | | v-model="queryParams.searchAll" |
| | | placeholder="请输入关键字" |
| | | v-model="queryParams.taskName" |
| | | placeholder="请输入巡检任务名称" |
| | | clearable |
| | | :style="{ width: '100%' }" |
| | | /> |
| | |
| | | |
| | | // 查询参数 |
| | | const queryParams = reactive({ |
| | | searchAll: "", |
| | | taskName: "", |
| | | }); |
| | | |
| | | // 单选框配置 |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {ref, reactive, toRefs, getCurrentInstance} from "vue"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | | import {afterSalesServiceAdd, afterSalesServiceUpdate} from "@/api/customerService/index.js"; |
| | |
| | | if(type === "add"){ |
| | | fileList.value = row.commonFiles; |
| | | } |
| | | if(type === "verifying"){ |
| | | form.value.valid = row.valid; |
| | | form.value.recordDate = row.mostDate; |
| | | } |
| | | |
| | | form.value.id = row.id; |
| | | form.value.code = row.code; |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="安装位置:" prop="instationLocation"> |
| | | <el-input |
| | | v-model="form.installationLocation" |
| | | v-model="form.instationLocation" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | |
| | | const data = reactive({ |
| | | form: { |
| | | code: "", |
| | | installationLocation: "", |
| | | instationLocation: "", |
| | | mostDate:"", |
| | | model: "", |
| | | cycle:"", |
| | |
| | | nextDate: "", |
| | | userId: "", |
| | | recordDate: "", |
| | | unit:"", |
| | | tempFileIds: [] |
| | | }, |
| | | rules: { |
| | |
| | | nextDate: [{required: true, message: "请选择", trigger: "change"}], |
| | | userId: [{required: true, message: "请选择", trigger: "change"}], |
| | | recordDate: [{required: true, message: "请选择", trigger: "change"}], |
| | | installationLocation: [{required: true, message: "请输入", trigger: "blur"}], |
| | | instationLocation: [{required: true, message: "请输入", trigger: "blur"}], |
| | | mostDate: [{required: true, message: "请选择", trigger: "change"}], |
| | | cycle: [{required: true, message: "请选择", trigger: "blur"}], |
| | | valid: [{required: true, message: "请输入", trigger: "blur"}], |
| | |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >搜索</el-button |
| | | > |
| | | <el-button @click="handleReset" style="margin-left: 10px">重置</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" @click="openForm('add')">新增计量器具</el-button> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {onMounted, ref} from "vue"; |
| | | import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue"; |
| | | import FormDia from "@/views/equipmentManagement/measurementEquipment/components/formDia.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | |
| | | // 重置搜索条件 |
| | | const handleReset = () => { |
| | | searchForm.value.recordDate = ""; |
| | | searchForm.value.code = ""; |
| | | searchForm.value.status = ""; |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | |
| | | <el-tag v-if="row.status === 0" type="warning">待保养</el-tag> |
| | | </template> |
| | | <template #operation="{ row }"> |
| | | <el-button |
| | | <!-- 这个功能跟新增保养功能一模一样,有啥意义? --> |
| | | <!-- <el-button |
| | | type="primary" |
| | | text |
| | | @click="addMaintain(row)" |
| | | > |
| | | 新增保养 |
| | | </el-button> |
| | | </el-button> --> |
| | | <el-button |
| | | type="primary" |
| | | link |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="发票号:"> |
| | | <el-input disabled v-model="form.invoiceNumber" /> |
| | | <el-input disabled |
| | | v-model="form.invoiceNumber" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="来票数:"> |
| | | <el-input-number :step="0.1" :min="0" style="width: 100%" v-model="form.ticketsNum" @change="inputTicketsNum" :precision="2"/> |
| | | <el-input-number :step="0.1" |
| | | :min="0" |
| | | style="width: 100%" |
| | | v-model="form.ticketsNum" |
| | | @change="inputTicketsNum" |
| | | :precision="2" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="本次来票金额(元):"> |
| | | <el-input-number :step="0.1" :min="0" style="width: 100%" v-model="form.ticketsAmount" @change="inputTicketsAmount" :precision="2"/> |
| | | <el-input-number :step="0.1" |
| | | :min="0" |
| | | style="width: 100%" |
| | | v-model="form.ticketsAmount" |
| | | @change="inputTicketsAmount" |
| | | :precision="2" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | <script setup> |
| | | import useFormData from "@/hooks/useFormData"; |
| | | import { getProductRecordById } from "@/api/procurementManagement/procurementInvoiceLedger"; |
| | | const { proxy } = getCurrentInstance() |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | defineOptions({ |
| | | name: "来票台账表单", |
| | | }); |
| | | const temFutureTickets = ref(0) |
| | | const temFutureTickets = ref(0); |
| | | const { form, resetForm } = useFormData({ |
| | | id: undefined, |
| | | purchaseContractNumber: undefined, // 采购合同号 |
| | |
| | | taxInclusiveUnitPrice: undefined, // 含税单价 |
| | | }); |
| | | |
| | | const load = async (id) => { |
| | | const { code, data } = await getProductRecordById({ id }); |
| | | const load = async (id, purchaseLedgerId, productModelId) => { |
| | | const { code, data } = await getProductRecordById({ |
| | | id: id, |
| | | purchaseLedgerId: purchaseLedgerId, |
| | | productModelId: productModelId, |
| | | }); |
| | | if (code === 200) { |
| | | form.id = data.id; |
| | | form.purchaseContractNumber = data.purchaseContractNumber; |
| | |
| | | } |
| | | }; |
| | | |
| | | const inputTicketsNum = (val) => { |
| | | const inputTicketsNum = val => { |
| | | // 确保含税单价存在且不为零 |
| | | if (!form.taxInclusiveUnitPrice || Number(form.taxInclusiveUnitPrice) === 0) { |
| | | proxy.$modal.msgWarning("含税单价不能为零或未定义"); |
| | |
| | | } |
| | | if (Number(form.ticketsNum) > Number(temFutureTickets.value)) { |
| | | proxy.$modal.msgWarning("开票数不得大于未开票数"); |
| | | form.ticketsNum = temFutureTickets.value |
| | | form.ticketsNum = temFutureTickets.value; |
| | | } |
| | | |
| | | // 确保所有数值都转换为数字类型进行计算 |
| | | const ticketsAmount = Number(form.ticketsNum) * Number(form.taxInclusiveUnitPrice); |
| | | const futureTickets = Number(temFutureTickets.value) - Number(form.ticketsNum); |
| | | const ticketsAmount = |
| | | Number(form.ticketsNum) * Number(form.taxInclusiveUnitPrice); |
| | | const futureTickets = |
| | | Number(temFutureTickets.value) - Number(form.ticketsNum); |
| | | form.futureTickets = Number(futureTickets.toFixed(2)); |
| | | form.ticketsAmount = Number(ticketsAmount.toFixed(2)); |
| | | }; |
| | | const inputTicketsAmount = (val) => { |
| | | const inputTicketsAmount = val => { |
| | | // 确保含税单价存在且不为零 |
| | | if (!form.taxInclusiveUnitPrice || Number(form.taxInclusiveUnitPrice) === 0) { |
| | | proxy.$modal.msgWarning("含税单价不能为零或未定义"); |
| | |
| | | |
| | | if (Number(val) > Number(form.futureTickets*form.taxInclusiveUnitPrice)) { |
| | | proxy.$modal.msgWarning("本次来票金额不得大于总金额"); |
| | | form.ticketsAmount = (form.futureTickets*form.taxInclusiveUnitPrice).toFixed(2) |
| | | const ticketsNum = Number(form.ticketsAmount) / Number(form.taxInclusiveUnitPrice); |
| | | form.ticketsNum = Number(ticketsNum.toFixed(2)) |
| | | form.ticketsAmount = ( |
| | | form.futureTickets * form.taxInclusiveUnitPrice |
| | | ).toFixed(2); |
| | | const ticketsNum = |
| | | Number(form.ticketsAmount) / Number(form.taxInclusiveUnitPrice); |
| | | form.ticketsNum = Number(ticketsNum.toFixed(2)); |
| | | return; |
| | | } |
| | | |
| | |
| | | <template> |
| | | <el-dialog :title="modalOptions.title" v-model="visible" @close="close"> |
| | | <el-dialog :title="modalOptions.title" |
| | | v-model="visible" |
| | | @close="close"> |
| | | <EditForm ref="editFormRef" /> |
| | | <template #footer> |
| | | <el-button type="primary" :loading="loading" @click="sendForm"> |
| | | <el-button type="primary" |
| | | :loading="loading" |
| | | @click="sendForm"> |
| | | {{ modalOptions.confirmText }} |
| | | </el-button> |
| | | <el-button @click="closeModal">{{ modalOptions.cancelText }}</el-button> |
| | |
| | | }); |
| | | const emits = defineEmits(["success"]); |
| | | |
| | | const saleLedgerProjectId = ref('') |
| | | const saleLedgerProjectId = ref(""); |
| | | const editFormRef = ref(); |
| | | const { |
| | | id, |
| | |
| | | closeModal, |
| | | } = useModal({ title: "来票台账" }); |
| | | |
| | | const open = async (row) => { |
| | | const open = async row => { |
| | | openModal(row.id); |
| | | saleLedgerProjectId.value = row.saleLedgerProjectId; |
| | | await nextTick(); |
| | | editFormRef.value.load(row.id); |
| | | editFormRef.value.load(row.id, row.purchaseLedgerId, row.productModelId); |
| | | }; |
| | | |
| | | const close = () => { |