| | |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // 下载产品导入模板 |
| | | export function downloadProductModelImportTemplate() { |
| | | return request({ |
| | | url: '/basic/product/export', |
| | | method: 'get', |
| | | responseType: 'blob' |
| | | }) |
| | | } |
| | |
| | | :headers="upload.headers" |
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport" |
| | | :disabled="upload.isUploading" |
| | | :showTip="false" |
| | | :showTip="true" |
| | | @success="handleFileSuccess" |
| | | :downloadTemplate="handleDownloadTemplate" |
| | | /> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | |
| | | import { getToken } from "@/utils/auth.js"; |
| | | import { FileUpload } from "@/components/Upload"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { downloadProductModelImportTemplate } from "@/api/basicData/product.js"; |
| | | |
| | | defineOptions({ |
| | | name: "产品维护导入", |
| | |
| | | ElMessage({ message: msg, type: "error" }); |
| | | } |
| | | }; |
| | | |
| | | // 下载 Excel 导入模板 |
| | | const handleDownloadTemplate = () => { |
| | | downloadProductModelImportTemplate() |
| | | .then((blobData) => { |
| | | const blob = |
| | | blobData instanceof Blob |
| | | ? blobData |
| | | : new Blob([blobData], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }); |
| | | const url = window.URL.createObjectURL(blob); |
| | | const link = document.createElement("a"); |
| | | link.href = url; |
| | | link.download = "产品导入模板.xlsx"; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(url); |
| | | ElMessage({ message: "模板下载成功", type: "success" }); |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ message: "模板下载失败", type: "error" }); |
| | | }); |
| | | }; |
| | | </script> |
| | |
| | | clearable |
| | | @change="handleQuery" |
| | | /> |
| | | <span class="search_title ml10">来源:</span> |
| | | <el-select v-model="searchForm.recordType" |
| | | style="width: 240px" |
| | | placeholder="请选择" |
| | | clearable> |
| | | <el-option v-for="item in stockRecordTypeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | <!-- <span class="search_title ml10">来源:</span>--> |
| | | <!-- <el-select v-model="searchForm.recordType"--> |
| | | <!-- style="width: 240px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- clearable>--> |
| | | <!-- <el-option v-for="item in stockRecordTypeOptions"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"/>--> |
| | | <!-- </el-select>--> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >搜索</el-button |
| | | > |
| | |
| | | <div> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">删除</el-button> |
| | | <el-button type="primary" plain @click="handlePrint">打印</el-button> |
| | | <!-- <el-button type="primary" plain @click="handlePrint">打印</el-button> --> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | |
| | | prop="createBy" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column label="来源" |
| | | <!-- <el-table-column label="来源" |
| | | prop="recordType" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ getRecordType(scope.row.recordType) }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | <el-table-column |
| | | label="车牌" |
| | | prop="licensePlateNo" |
| | |
| | | label: '合格出库', |
| | | name: 'qualified', |
| | | type: '0' |
| | | }, |
| | | { |
| | | label: '不合格出库', |
| | | name: 'unqualified', |
| | | type: '1' |
| | | } |
| | | ] |
| | | }) |
| | |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10">来源:</span> |
| | | <el-select v-model="searchForm.recordType" |
| | | style="width: 240px" |
| | | placeholder="请选择" |
| | | clearable> |
| | | <el-option v-for="item in stockRecordTypeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | <!-- <span class="search_title ml10">来源:</span>--> |
| | | <!-- <el-select v-model="searchForm.recordType"--> |
| | | <!-- style="width: 240px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- clearable>--> |
| | | <!-- <el-option v-for="item in stockRecordTypeOptions"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"/>--> |
| | | <!-- </el-select>--> |
| | | <el-button type="primary" |
| | | @click="handleQuery" |
| | | style="margin-left: 10px">搜索 |
| | |
| | | <el-table-column label="入库人" |
| | | prop="createBy" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="来源" |
| | | <!-- <el-table-column label="来源" |
| | | prop="recordType" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ getRecordType(scope.row.recordType) }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | <el-table-column label="过磅日期" |
| | | prop="weighingDate" |
| | | v-if="type === '0'" |
| | |
| | | label: '合格入库', |
| | | name: 'qualified', |
| | | type: '0' |
| | | }, |
| | | { |
| | | label: '不合格入库', |
| | | name: 'unqualified', |
| | | type: '1' |
| | | } |
| | | ]) |
| | | |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="车牌号" |
| | | prop="licensePlateNo" |
| | | :rules="[{ required: true, message: '请输入车牌号', trigger: ['blur','change'] }]" |
| | | > |
| | | <el-input v-model="formState.licensePlateNo" /> |
| | | </el-form-item> |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="毛重(吨)" |
| | | prop="grossWeight" |
| | | :rules="[{ required: true, message: '请输入毛重', trigger: ['blur','change'] }]" |
| | | > |
| | | <el-input-number |
| | | v-model="formState.grossWeight" |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="皮重(吨)" |
| | | prop="tareWeight" |
| | | :rules="[{ required: true, message: '请输入皮重', trigger: ['blur','change'] }]" |
| | | > |
| | | <el-input-number |
| | | v-model="formState.tareWeight" |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="净重(吨)" |
| | | prop="netWeight" |
| | | :rules="[{ required: true, message: '请先输入毛重和皮重自动计算净重', trigger: ['blur','change'] }]" |
| | | > |
| | | <el-input-number |
| | | v-model="formState.netWeight" |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="过磅日期" |
| | | prop="weighingDate" |
| | | :rules="[{ required: true, message: '请选择过磅日期', trigger: 'change' }]" |
| | | > |
| | | <el-date-picker |
| | | style="width: 100%" |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="过磅员" |
| | | prop="weighingOperator" |
| | | :rules="[{ required: true, message: '请输入过磅员', trigger: ['blur','change'] }]" |
| | | > |
| | | <el-input v-model="formState.weighingOperator" /> |
| | | </el-form-item> |
| | |
| | | const computedNet = safeNet > 0 ? safeNet : 0; |
| | | const maxNet = ledgerNetWeight.value; |
| | | if (Number.isFinite(maxNet) && maxNet > 0 && computedNet > maxNet) { |
| | | formState.value.netWeight = Number(maxNet.toFixed(2)); |
| | | const cappedNet = Number(maxNet.toFixed(2)); |
| | | formState.value.netWeight = cappedNet; |
| | | // 同步毛重,保持:净重 = 毛重 - 皮重 |
| | | const tare = Number(tareWeight); |
| | | if (Number.isFinite(tare)) { |
| | | formState.value.grossWeight = Number((tare + cappedNet).toFixed(2)); |
| | | } |
| | | proxy?.$modal?.msgWarning?.(`领用净重不能超过台账净重(${maxNet.toFixed(2)} 吨)`); |
| | | return; |
| | | } |
| | |
| | | { |
| | | label: '合格库存', |
| | | name: 'qualified' |
| | | }, |
| | | { |
| | | label: '不合格库存', |
| | | name: 'unqualified' |
| | | } |
| | | ]) |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="top-middle2"> |
| | | <div class="data-card consumables"> |
| | | <div class="data-title">耗材数据</div> |
| | | <div class="data-num"> |
| | | <div> |
| | | <div class="data-desc">当前耗材总量/件</div> |
| | | <div class="data-value">{{ businessInfo.consumablesQuantityTotal || 0 }}</div> |
| | | </div> |
| | | <div> |
| | | <div class="data-desc">今日耗材入库/件</div> |
| | | <div class="data-value">{{ businessInfo.consumablesTodayNum || 0 }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="top-right"> |
| | | <div class="todo-panel"> |
| | | <div class="section-title">待办事项</div> |
| | |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="quality-cards"> |
| | | <div class="quality-card one">原材料已检测数 <span>{{ qualityStatisticsObject.supplierNum }}件</span></div> |
| | | <div class="quality-card two">过程检验数量 <span>{{ qualityStatisticsObject.processNum }}件</span></div> |
| | | <div class="quality-card three">出厂已检数量 <span>{{ qualityStatisticsObject.factoryNum }}件</span></div> |
| | | <div class="quality-card one">入厂检测数 <span>{{ qualityStatisticsObject.supplierNum }}件</span></div> |
| | | <div class="quality-card two">车间检测数 <span>{{ qualityStatisticsObject.processNum }}件</span></div> |
| | | <div class="quality-card three">出厂检数 <span>{{ qualityStatisticsObject.factoryNum }}件</span></div> |
| | | </div> |
| | | <Echarts ref="chart" :chartStyle="chartStyle" :grid="grid" :legend="barLegend" :series="barSeries1" |
| | | :tooltip="tooltip" :xAxis="xAxis1" :yAxis="yAxis1" style="height: 260px"></Echarts> |
| | |
| | | |
| | | const businessInfo = ref({ |
| | | inventoryNum: 0, |
| | | consumablesQuantityTotal: 0, |
| | | monthPurchaseHaveMoney: 0, |
| | | monthPurchaseMoney: 0, |
| | | monthSaleHaveMoney: 0, |
| | | monthSaleMoney: 0, |
| | | todayInventoryNum: 0, |
| | | consumablesTodayNum: 0, |
| | | }) |
| | | const qualityStatisticsObject = ref({ |
| | | supplierNum: 0, |
| | |
| | | background-repeat: no-repeat; |
| | | } |
| | | |
| | | .data-card.consumables { |
| | | background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%); |
| | | } |
| | | |
| | | .data-desc { |
| | | font-weight: 500; |
| | | font-size: 16px; |
| | |
| | | |
| | | .top-left, |
| | | .top-middle, |
| | | .top-middle2, |
| | | .top-right { |
| | | flex: 1; |
| | | display: flex; |
| | | min-width: 0; |
| | | } |
| | | |
| | | .dashboard-top { |
| | | gap: 12px; |
| | | } |
| | | |
| | | .todo-panel { |
| | |
| | | <div> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">删除</el-button> |
| | | <el-button type="primary" plain @click="handlePrint">打印</el-button> |
| | | <!-- <el-button type="primary" plain @click="handlePrint">打印</el-button> --> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | |
| | | label: '合格出库', |
| | | name: 'qualified', |
| | | type: '0' |
| | | }, |
| | | { |
| | | label: '不合格出库', |
| | | name: 'unqualified', |
| | | type: '1' |
| | | } |
| | | ] |
| | | }) |
| | |
| | | label: '合格入库', |
| | | name: 'qualified', |
| | | type: '0' |
| | | }, |
| | | { |
| | | label: '不合格入库', |
| | | name: 'unqualified', |
| | | type: '1' |
| | | } |
| | | ]) |
| | | |
| | |
| | | |
| | | <!-- 半成品:允许手动填写数量入库 --> |
| | | <el-form-item |
| | | v-if="type === 'qualified' && (formState.parentName === '半成品' || formState.productType === 1)" |
| | | v-if="type === 'qualified' && (formState.parentName === '半成品' || formState.parentName === '成品' || formState.productType === 1)" |
| | | label="数量" |
| | | prop="qualitity" |
| | | :rules="[ |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="车牌号" |
| | | prop="licensePlateNo" |
| | | :rules="[{ required: true, message: '请输入车牌号', trigger: ['blur','change'] }]" |
| | | > |
| | | <el-input v-model="formState.licensePlateNo" /> |
| | | </el-form-item> |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="毛重(吨)" |
| | | prop="grossWeight" |
| | | :rules="[{ required: true, message: '请输入毛重', trigger: ['blur','change'] }]" |
| | | > |
| | | <el-input-number |
| | | v-model="formState.grossWeight" |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="皮重(吨)" |
| | | prop="tareWeight" |
| | | :rules="[{ required: true, message: '请输入皮重', trigger: ['blur','change'] }]" |
| | | > |
| | | <el-input-number |
| | | v-model="formState.tareWeight" |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="净重(吨)" |
| | | prop="netWeight" |
| | | :rules="[{ required: true, message: '请先输入毛重和皮重自动计算净重', trigger: ['blur','change'] }]" |
| | | > |
| | | <el-input-number |
| | | v-model="formState.netWeight" |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="过磅日期" |
| | | prop="weighingDate" |
| | | :rules="[{ required: true, message: '请选择过磅日期', trigger: 'change' }]" |
| | | > |
| | | <el-date-picker |
| | | style="width: 100%" |
| | |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="过磅员" |
| | | prop="weighingOperator" |
| | | :rules="[{ required: true, message: '请输入过磅员', trigger: ['blur','change'] }]" |
| | | > |
| | | <el-input v-model="formState.weighingOperator" /> |
| | | </el-form-item> |
| | |
| | | const computedNet = safeNet > 0 ? safeNet : 0; |
| | | const maxNet = ledgerNetWeight.value; |
| | | if (Number.isFinite(maxNet) && maxNet > 0 && computedNet > maxNet) { |
| | | formState.value.netWeight = Number(maxNet.toFixed(2)); |
| | | const cappedNet = Number(maxNet.toFixed(2)); |
| | | formState.value.netWeight = cappedNet; |
| | | // 同步毛重,保持:净重 = 毛重 - 皮重 |
| | | const tare = Number(tareWeight); |
| | | if (Number.isFinite(tare)) { |
| | | formState.value.grossWeight = Number((tare + cappedNet).toFixed(2)); |
| | | } |
| | | proxy?.$modal?.msgWarning?.(`领用净重不能超过台账净重(${maxNet.toFixed(2)} 吨)`); |
| | | return; |
| | | } |
| | |
| | | { |
| | | label: '合格库存', |
| | | name: 'qualified' |
| | | }, |
| | | { |
| | | label: '不合格库存', |
| | | name: 'unqualified' |
| | | } |
| | | ]) |
| | | |
| | |
| | | placeholder="请输入检测项目名称" |
| | | clearable |
| | | :prefix-icon="Search" |
| | | @change="handleQuery" |
| | | @clear="handleQuery" |
| | | /> |
| | | <el-button type="primary" style="margin-left: 10px" @click="handleQuery">搜索</el-button> |
| | |
| | | <div style="display: flex;flex-direction: row;align-items: center;"> |
| | | <div> |
| | | <span class="search_title">类型:</span> |
| | | <el-select v-model="searchForm.inspectType" clearable style="width: 200px" @change="handleQuery"> |
| | | <el-select v-model="searchForm.checkType" clearable style="width: 200px" @change="handleQuery"> |
| | | <el-option label="入厂检" :value="0" /> |
| | | <el-option label="车间检" :value="1" /> |
| | | <el-option label="出厂检" :value="2" /> |
| | | </el-select> |
| | | </div> |
| | | <div style="margin-left: 10px"> |
| | | <!-- <div style="margin-left: 10px"> |
| | | <span class="search_title">状态:</span> |
| | | <el-select v-model="searchForm.inspectState" clearable style="width: 200px" @change="handleQuery"> |
| | | <el-option label="待处理" :value="0" /> |
| | | <el-option label="已处理" :value="1" /> |
| | | </el-select> |
| | | </div> |
| | | </div> --> |
| | | <div style="margin-left: 10px"> |
| | | <span class="search_title">产品名称:</span> |
| | | <el-input |
| | |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | inspectType: "", |
| | | checkType: "", |
| | | inspectState: "", |
| | | productName: "", |
| | | entryDate: undefined, // 录入日期 |
| | |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "类别", |
| | | prop: "inspectType", |
| | | label: "检测类型", |
| | | prop: "checkType", |
| | | dataType: "tag", |
| | | width: 120, |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | if (params === 0) { |
| | | return "入厂检"; |
| | | } else if (params == 1) { |
| | | } else if (params === 1) { |
| | | return "车间检"; |
| | | } else { |
| | | return '出厂检'; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == '不合格') { |
| | | if (params === '不合格') { |
| | | return "info"; |
| | | } else if (params == '合格') { |
| | | return "success"; |
| | |
| | | <div class="typeNum-left"> |
| | | <img src="~@/assets/images/chartCard.svg" alt="图表" |
| | | style="width: 40px; height: 40px; object-fit: contain;"> |
| | | <div class="typeNum-left-text">原材料</div> |
| | | <div class="typeNum-left-text">入厂检</div> |
| | | </div> |
| | | <div class="typeNum-center"> |
| | | <div class="typeNum-leftLine">-</div> |
| | |
| | | <div class="typeNum-left"> |
| | | <img src="~@/assets/images/chartCard2.svg" alt="图表" |
| | | style="width: 40px; height: 40px; object-fit: contain;"> |
| | | <div class="typeNum-left-text" style="color: #5EB334;">半成品</div> |
| | | <div class="typeNum-left-text" style="color: #5EB334;">车间检</div> |
| | | </div> |
| | | <div class="typeNum-center"> |
| | | <div class="typeNum-leftLine2">-</div> |
| | |
| | | <div class="typeNum-left"> |
| | | <img src="~@/assets/images/chartCard3.svg" alt="图表" |
| | | style="width: 40px; height: 40px; object-fit: contain;"> |
| | | <div class="typeNum-left-text" style="color: #8000FF;">成品</div> |
| | | <div class="typeNum-left-text" style="color: #8000FF;">出厂检</div> |
| | | </div> |
| | | <div class="typeNum-center"> |
| | | <div class="typeNum-leftLine3">-</div> |
| | |
| | | <div class="top-container flex-center"> |
| | | <div class="quality-card blue-card"> |
| | | <div class="quality-card-title"> |
| | | <img src="~@/assets/images/chartCard.svg" alt="原材料" |
| | | <img src="~@/assets/images/chartCard.svg" alt="入厂检" |
| | | style="width: 24px; height: 24px; margin-right: 8px;"> |
| | | 原材料合格率 |
| | | 入厂检合格率 |
| | | </div> |
| | | <div class="quality-card-content"> |
| | | <div class="quality-item"> |
| | |
| | | </div> |
| | | <div class="quality-card green-card"> |
| | | <div class="quality-card-title"> |
| | | <img src="~@/assets/images/chartCard2.svg" alt="半成品" |
| | | <img src="~@/assets/images/chartCard2.svg" alt="车间检" |
| | | style="width: 24px; height: 24px; margin-right: 8px;"> |
| | | 半成品合格率 |
| | | 车间检合格率 |
| | | </div> |
| | | <div class="quality-card-content"> |
| | | <div class="quality-item"> |
| | |
| | | </div> |
| | | <div class="quality-card purple-card"> |
| | | <div class="quality-card-title"> |
| | | <img src="~@/assets/images/chartCard3.svg" alt="成品" |
| | | <img src="~@/assets/images/chartCard3.svg" alt="出厂检" |
| | | style="width: 24px; height: 24px; margin-right: 8px;"> |
| | | 成品合格率 |
| | | 出厂检合格率 |
| | | </div> |
| | | <div class="quality-card-content"> |
| | | <div class="quality-item"> |
| | |
| | | </div> |
| | | <div class="container-line-right-bottom"> |
| | | <div class="inspection-chart-box"> |
| | | <div class="chart-box-title">原材料总数</div> |
| | | <div class="chart-box-title">入厂检总数</div> |
| | | <div class="chart-box-num">{{ getYearlyStatValue(0, 'totalCount') }}</div> |
| | | </div> |
| | | <div class="inspection-chart-box"> |
| | | <div class="chart-box-title">半成品总数</div> |
| | | <div class="chart-box-title">车间检总数</div> |
| | | <div class="chart-box-num">{{ getYearlyStatValue(1, 'totalCount') }}</div> |
| | | </div> |
| | | <div class="inspection-chart-box"> |
| | | <div class="chart-box-title">成品总数</div> |
| | | <div class="chart-box-title">出厂检总数</div> |
| | | <div class="chart-box-num">{{ getYearlyStatValue(2, 'totalCount') }}</div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <!-- Tab 选择器 --> |
| | | <div class="tab-selector"> |
| | | <div class="tab-item" :class="{ active: activeTab === 'raw' }" @click="activeTab = 'raw'">原材料</div> |
| | | <div class="tab-item" :class="{ active: activeTab === 'semi' }" @click="activeTab = 'semi'">半成品</div> |
| | | <div class="tab-item" :class="{ active: activeTab === 'final' }" @click="activeTab = 'final'">成品</div> |
| | | <div class="tab-item" :class="{ active: activeTab === 'raw' }" @click="activeTab = 'raw'">入厂检</div> |
| | | <div class="tab-item" :class="{ active: activeTab === 'semi' }" @click="activeTab = 'semi'">车间检</div> |
| | | <div class="tab-item" :class="{ active: activeTab === 'final' }" @click="activeTab = 'final'">出厂检</div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | |
| | | containLabel: true, |
| | | }, |
| | | legend: { |
| | | data: ["原材料", "半成品", "成品"], // 图例数据 |
| | | data: ["入厂检", "车间检", "出厂检"], // 图例数据 |
| | | icon: ["circle", "circle", "circle"], |
| | | itemWidth: 10, // 设置图标宽度 |
| | | itemHeight: 10, |
| | |
| | | }, |
| | | series: [ |
| | | { |
| | | name: "原材料", |
| | | name: "入厂检", |
| | | type: "bar", |
| | | barWidth: "15%", |
| | | data: monthlyCompletionDetailsData.value.map(item => item.rawMaterialCount), |
| | |
| | | }, |
| | | }, |
| | | { |
| | | name: "半成品", |
| | | name: "车间检", |
| | | type: "bar", |
| | | barWidth: "15%", |
| | | |
| | |
| | | }, |
| | | }, |
| | | { |
| | | name: "成品", |
| | | name: "出厂检", |
| | | type: "bar", |
| | | barWidth: "15%", |
| | | |
| | |
| | | type: "pie", |
| | | radius: "70%", |
| | | data: [ |
| | | { value: getYearlyStatValue(0, 'totalCount'), name: "原材料", itemStyle: { color: "#1890FF" } }, |
| | | { value: getYearlyStatValue(1, 'totalCount'), name: "半成品", itemStyle: { color: "#F7BA1E" } }, |
| | | { value: getYearlyStatValue(2, 'totalCount'), name: "成品", itemStyle: { color: "#14C9C9" } }, |
| | | { value: getYearlyStatValue(0, 'totalCount'), name: "入厂检", itemStyle: { color: "#1890FF" } }, |
| | | { value: getYearlyStatValue(1, 'totalCount'), name: "车间检", itemStyle: { color: "#F7BA1E" } }, |
| | | { value: getYearlyStatValue(2, 'totalCount'), name: "出厂检", itemStyle: { color: "#14C9C9" } }, |
| | | ], |
| | | label: { |
| | | show: true, |
| | |
| | | }, |
| | | // 图例配置 |
| | | legend: { |
| | | data: ["原材料", "半成品", "成品"], // 图例数据 |
| | | data: ["入厂检", "车间检", "出厂检"], // 图例数据 |
| | | icon: ["circle", "circle", "circle"], |
| | | itemWidth: 10, // 设置图标宽度 |
| | | itemHeight: 10, |
| | |
| | | // 系列数据 |
| | | series: [ |
| | | { |
| | | name: "原材料", // 系列名称 |
| | | name: "入厂检", // 系列名称 |
| | | type: "line", // 图表类型为折线图 |
| | | // stack: "Total", // 堆叠名称 |
| | | symbol: "circle", |
| | |
| | | data: monthlyPassRateData.value.map(item => item.rawMaterial.passRate), |
| | | }, |
| | | { |
| | | name: "半成品", // 系列名称 |
| | | name: "车间检", // 系列名称 |
| | | type: "line", // 图表类型为折线图 |
| | | // stack: "Total", // 堆叠名称 |
| | | symbol: "circle", |
| | |
| | | data: monthlyPassRateData.value.map(item => item.process.passRate), |
| | | }, |
| | | { |
| | | name: "成品", // 系列名称 |
| | | name: "出厂检", // 系列名称 |
| | | type: "line", // 图表类型为折线图 |
| | | // stack: "Total", // 堆叠名称 |
| | | symbol: "circle", |
| | |
| | | executionDate: "", |
| | | }; |
| | | } else { |
| | | form.value = row; |
| | | // 关键:编辑时不要直接引用表格行对象,避免取消/重置时把列表数据一起清空 |
| | | // 使用深拷贝断开引用关系 |
| | | form.value = JSON.parse(JSON.stringify(row || {})); |
| | | } |
| | | dialogFormVisible.value = true; |
| | | }; |
| | |
| | | // 关闭弹框 |
| | | const closeDia = () => { |
| | | proxy.resetForm("formRef"); |
| | | form.value = {}; |
| | | dialogFormVisible.value = false; |
| | | }; |
| | | // 关闭产品弹框 |
| | |
| | | background-color: #fef0f0 !important; |
| | | } |
| | | |
| | | :deep(.warning-row td) { |
| | | // color: #cf1322 !important; |
| | | } |
| | | /* :deep(.warning-row td) { |
| | | color: #cf1322 !important; |
| | | } */ |
| | | |
| | | .actions { |
| | | display: flex; |
| | |
| | | const env = loadEnv(mode, process.cwd()); |
| | | const { VITE_APP_ENV } = env; |
| | | const baseUrl = |
| | | env.VITE_APP_ENV === "development" |
| | | ? "http://1.15.17.182:9003" |
| | | : env.VITE_BASE_API; |
| | | env.VITE_APP_ENV === "development" |
| | | ? "http://1.15.17.182:9011" |
| | | : env.VITE_BASE_API; |
| | | const javaUrl = |
| | | env.VITE_APP_ENV === "development" |
| | | ? "http://1.15.17.182:9002" |
| | | : env.VITE_JAVA_API; |
| | | env.VITE_APP_ENV === "development" |
| | | ? "http://1.15.17.182:9010" |
| | | : env.VITE_JAVA_API; |
| | | return { |
| | | define:{ |
| | | __BASE_API__: JSON.stringify(javaUrl) |
| | | define: { |
| | | __BASE_API__: JSON.stringify(javaUrl), |
| | | }, |
| | | // 部署生产环境和开发环境下的URL。 |
| | | // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上 |