| | |
| | | <el-form-item label="æ£éªç±»å:"> |
| | | <el-select v-model="searchData.type" placeholder="å
¨é¨" style="width: 100px;margin-right: 20px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | v-for="item in typeoptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªç¶æ:" style="margin-right: 20px;"> |
| | | <el-form-item label="æ£éªç»æ:" style="margin-right: 20px;"> |
| | | <el-select v-model="searchData.state" placeholder="å
¨é¨" style="width: 100px;margin-right: 20px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | v-for="item in stateoptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary">æ¥è¯¢</el-button> |
| | | <el-button type="primary" plain>éç½®</el-button> |
| | | <el-button type="primary" @click="searchInspections">æ¥è¯¢</el-button> |
| | | <el-button type="primary" plain @click="reset">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form class="rightBtn"> |
| | |
| | | min-width="30px" |
| | | /> |
| | | <el-table-column |
| | | prop="applicationnum" |
| | | prop="icode" |
| | | label="ç³è¯·åå·" |
| | | min-width="100px" |
| | | /> |
| | | <el-table-column |
| | | prop="checktype" |
| | | prop="type" |
| | | label="æ£éªç±»å" |
| | | min-width="80px" |
| | | /> |
| | | <el-table-column |
| | | prop="checkstate" |
| | | label="æ£éªç¶æ" |
| | | min-width="70px"> |
| | | min-width="80px"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="scope.row.checkstate === '1'"> |
| | | <span style="color: green;">å·²æ£æµ</span> |
| | | </div> |
| | | <div v-else> |
| | | <span style="color: red;">æªæ£æµ</span> |
| | | </div> |
| | | |
| | | <div v-if="scope.row.type === 0" ><span>åæææ£éª</span></div> |
| | | <div v-if="scope.row.type === 1" ><span>å§ææ£éª</span></div> |
| | | <div v-if="scope.row.type === 2" ><span>æåæ£éª</span></div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="deliverydate" |
| | | prop="formTime" |
| | | label="æ¥ææ¥æ" |
| | | min-width="100px" |
| | | /> |
| | | <el-table-column |
| | | prop="provider" |
| | | prop="supplier" |
| | | label="ä¾åºååç§°" |
| | | min-width="150px" |
| | | /> |
| | | <el-table-column |
| | | prop="rawcode" |
| | | prop="mcode" |
| | | label="åææç¼ç " |
| | | min-width="120px" |
| | | min-width="150px" |
| | | /> |
| | | <el-table-column |
| | | prop="rawname" |
| | | prop="name" |
| | | label="åææåç§°" |
| | | min-width="80px" |
| | | /> |
| | | <el-table-column |
| | | prop="modelandspecification" |
| | | prop="specifications" |
| | | label="è§æ ¼åå·" |
| | | min-width="160px" |
| | | /> |
| | |
| | | min-width="50px" |
| | | /> |
| | | <el-table-column |
| | | prop="amount" |
| | | prop="num" |
| | | label="æ°é" |
| | | min-width="50px" |
| | | /> |
| | | <el-table-column |
| | | prop="registrationdate" |
| | | prop="createTime" |
| | | label="ç»è®°æ¥æ" |
| | | min-width="80px" |
| | | /> |
| | | <el-table-column |
| | | prop="registrator" |
| | | prop="userName" |
| | | label="ç»è®°äºº" |
| | | min-width="80px" |
| | | /> |
| | | <el-table-column |
| | | prop="qualified" |
| | | label="æ£éªç¶æ" |
| | | prop="inspection_status" |
| | | label="æ£éªç»æ" |
| | | min-width="80px"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="scope.row.qualified === null"> |
| | | <span></span> |
| | | </div> |
| | | <div v-else> |
| | | <el-tag :type="scope.row.qualified === '0' ? 'success' : 'danger'" |
| | | <el-tag class="tag" :type="scope.row.inspection_status === 0 ? 'danger' : 'success'" |
| | | disable-transitions |
| | | >{{ scope.row.qualified === '0' ? 'åæ ¼' : 'ä¸åæ ¼' }}</el-tag> |
| | | </div> |
| | | >{{ scope.row.inspection_status === 0 ? 'ä¸åæ ¼' : 'åæ ¼' }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="applier" |
| | | label="ç³è¯·äºº" |
| | | min-width="80px" |
| | | /> |
| | | <el-table-column |
| | | prop="checker" |
| | | label="æ£éªäºº" |
| | | min-width="80px" |
| | | /> |
| | | <el-table-column |
| | | prop="checktime" |
| | | prop="checkdate" |
| | | label="æ£éªæ¥æ" |
| | | min-width="80px" |
| | | min-width="150px" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | |
| | | <el-pagination |
| | | class="pagination" |
| | | :current-page="currentPage" |
| | | :page-sizes="[100, 200, 300, 400]" |
| | | :page-sizes="[5, 10, 20, 30]" |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | |
| | | width="50%" |
| | | > |
| | | <div class="check-box"> |
| | | <el-radio-group v-model="type"> |
| | | <el-radio-group v-model="type" @change="handleRadioChange"> |
| | | <el-radio :label="0" border>åæææ£éª</el-radio> |
| | | <el-radio :label="1" border>åæåæ£éª</el-radio> |
| | | <el-radio :label="1" border>å§ææ£éª</el-radio> |
| | | <el-radio :label="2" border>æåæ£éª</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <el-form :model="infoForm" ref="infoForm" class="infoForm" label-position="top" label-width="200px" size="mini"> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ¥ææ¥æï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.deliverydate" placeholder="请è¾å
¥æ¥ææ¥æ" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="ä¾åºååç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.name" placeholder="请è¾å
¥ä¾åºååç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åææç¼ç ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.code" placeholder="请è¾å
¥åææç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åææåç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.name" placeholder="请è¾å
¥åææåç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.modelandspecification" placeholder="请è¾å
¥è§æ ¼åå·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.unit" placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.amount" placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ£éªæ¶é´ï¼"> |
| | | <div v-if="type === 0 || type === ''"> |
| | | <el-form :model="infoForm" ref="infoForm" class="checkTypeForm" label-position="top" label-width="200px" size="mini"> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ¥ææ¥æï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.dateSurvey" placeholder="请è¾å
¥æ¥ææ¥æ" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="ä¾åºååç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.supplierName" placeholder="请è¾å
¥ä¾åºååç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åææç¼ç ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.materialCoding" placeholder="请è¾å
¥åææç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åææåç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.materialName" placeholder="请è¾å
¥åææåç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.specificationsModels" placeholder="请è¾å
¥è§æ ¼åå·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.unit" placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 300px" type="text" :value="infoForm.quantity" placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ£éªæ¶é´ï¼"> |
| | | <el-date-picker |
| | | v-model="infoForm.checkdate" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | style="width: 300px;"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div v-if="type === 1"> |
| | | <el-form :model="commisionSelection" ref="commisionTable" class="checkTypeForm" label-position="top" label-width="200px" size="mini"> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ¥ææ¥æï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.formTime" placeholder="请è¾å
¥æ¥ææ¥æ" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="ä¾åºååç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.supplier" placeholder="请è¾å
¥å§æåä½" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="å§æç¼å·ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.mcode" placeholder="请è¾å
¥æ ·åç¼å·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="å§æåç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.name" placeholder="请è¾å
¥æ ·ååç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.specifications" placeholder="请è¾å
¥åå·è§æ ¼" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.unit" placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 300px" type="text" :value="commisionSelection.num" placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ£éªæ¥æï¼"> |
| | | <el-date-picker |
| | | v-model="infoForm.checkdate" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | style="width: 300px;"> |
| | | v-model="commisionSelection.checkdate" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | style="width: 300px;"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div v-if="type === 2"> |
| | | <el-form :model="finishedTable" ref="finishedTable" class="checkTypeForm" label-position="top" label-width="200px" size="mini"> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ¥ææ¥æï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.deliverydate" placeholder="请è¾å
¥æ¥ææ¥æ" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="ä¾åºååç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.supplier" placeholder="请è¾å
¥ä¾åºååç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åææç¼ç ï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.code" placeholder="请è¾å
¥åææç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åææåç§°ï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.name" placeholder="请è¾å
¥åææåç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.modelandspecification" placeholder="请è¾å
¥è§æ ¼åå·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.unit" placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.amount" placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="æ£éªæ¶é´ï¼"> |
| | | <el-date-picker |
| | | v-model="finishedTable.checkdate" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | style="width: 300px;"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="checkTypeVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="goToForInspectionDetail">ç¡® å®</el-button> |
| | | <el-button type="primary" @click="addInspection">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | <!-- åæææ£éªæ¨¡ææ¡ --> |
| | | <el-dialog |
| | | title="åæææ£éª" |
| | | :visible.sync="rawmaterialVisible" |
| | | width="60%"> |
| | | <div class="table-box"> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :max-height="800" |
| | | :cell-style="{textAlign: 'center'}" |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}" |
| | | :data="rawMaterialTable" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | label="" |
| | | min-width="10%" |
| | | /> |
| | | <el-table-column |
| | | type="index" |
| | | label="åºå·" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="dateSurvey" |
| | | label="æ¥ææ¥æ" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="supplierName" |
| | | label="ä¾åºååç§°" |
| | | min-width="12%" |
| | | /> |
| | | <el-table-column |
| | | prop="materialCoding" |
| | | label="ææç¼ç " |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="materialName" |
| | | label="ææåç§°" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="specificationsModels" |
| | | label="è§æ ¼åå·" |
| | | min-width="12%" |
| | | /> |
| | | <el-table-column |
| | | prop="unit" |
| | | label="åä½" |
| | | min-width="5%" |
| | | /> |
| | | <el-table-column |
| | | prop="quantity" |
| | | label="æ°é" |
| | | min-width="5%" |
| | | /> |
| | | <el-table-column |
| | | prop="inspectionDate" |
| | | label="æ¥æ£æ¥æ" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="surveyor" |
| | | label="æ£éªäºº" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="createTime" |
| | | label="æ£éªæ¥æ" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="state" |
| | | label="ç¶æ" |
| | | min-width="8%" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span :style="{ color: scope.row.state === 1 ? 'green' : 'red' }"> |
| | | {{ scope.row.state===1 ? 'å·²æ£æµ':'å¾
æ£æµ' }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="rawmaterialVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleRawMaterialSelection">ç¡® å®</el-button> |
| | | </span> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- å§ææ£éªæ¨¡ææ¡ --> |
| | | <el-dialog |
| | | title="å§ææ£éª" |
| | | :visible.sync="commisionVisible" |
| | | width="60%"> |
| | | <div class="table-box"> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :max-height="800" |
| | | :cell-style="{textAlign: 'center'}" |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}" |
| | | :data="commisionTable" |
| | | @selection-change="handleSelectionChange" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | min-width="10%" |
| | | /> |
| | | <el-table-column |
| | | type="index" |
| | | label="åºå·" |
| | | min-width="10%" |
| | | /> |
| | | <el-table-column |
| | | prop="formTime" |
| | | label="æ¥ææ¥æ" |
| | | min-width="10%" |
| | | /> |
| | | <el-table-column |
| | | prop="supplier" |
| | | label="ä¾åºååç§°" |
| | | min-width="12%" |
| | | /> |
| | | <el-table-column |
| | | prop="mcode" |
| | | label="ææç¼ç " |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="specifications" |
| | | label="è§æ ¼åå·" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="unit" |
| | | label="åä½" |
| | | min-width="12%" |
| | | /> |
| | | <el-table-column |
| | | prop="num" |
| | | label="æ°é" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="checkdate_" |
| | | label="æ£éªæ¥æ" |
| | | min-width="8%" |
| | | /> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="commisionVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleCommisionSelection">ç¡® å®</el-button> |
| | | </span> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | <template v-else> |
| | | <router-view /> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getInspectionList } from '@/api/rawMaterials/reportForInspection' |
| | | import { selectInspectsList, selectAll, addInspect} from '@/api/experiment/planAssignments' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | type: '', |
| | | state: '' |
| | | }, |
| | | inspectionTable: [{ |
| | | applicationnum: 'QC22-09155', |
| | | checktype: 'åæææ£éª', |
| | | checkstate: '1', |
| | | deliverydate: '2023-07-31', |
| | | provider: 'å½ç½å±±ä¸ççµåæéå
¬å¸', |
| | | rawcode: '1010010090124', |
| | | rawname: 'éå
é¢ç»çº¿', |
| | | modelandspecification: 'JLHA1/G1A-185/30-27/7', |
| | | unit: 'ml/kg', |
| | | amount: '1999', |
| | | registrationdate: '2022-09-23', |
| | | registrator: 'æå°é¾', |
| | | qualified: '0', |
| | | applier: 'æå°é¾', |
| | | checker: 'æå°é¾', |
| | | checktime: '2023-12-09' |
| | | inspectionTable: [], |
| | | rawMaterialTable: [], |
| | | commisionTable: [{ |
| | | specifications_models: "GGXH-AAAAA", |
| | | inspectionTime: "2023-08-03", |
| | | id: 2, |
| | | samples_number: 0, |
| | | dateSurvey: "2023-08-03", |
| | | entrusted: "é¿éå·´å·´", |
| | | completionDeadline: "2023-08-03", |
| | | contacts: "å°é»", |
| | | entrust_coding: "SL20230803000003", |
| | | sample_name: "å卿º", |
| | | inspection_status: 1 |
| | | },{ |
| | | applicationnum: 'QC22-09155', |
| | | checktype: 'åæææ£éª', |
| | | checkstate: '1', |
| | | deliverydate: '2023-07-31', |
| | | provider: 'å½ç½å±±ä¸ççµåæéå
¬å¸', |
| | | rawcode: '1010010090124', |
| | | rawname: 'éå
é¢ç»çº¿', |
| | | modelandspecification: 'JLHA1/G1A-185/30-27/7', |
| | | unit: 'ml/kg', |
| | | amount: '1999', |
| | | registrationdate: '2022-09-23', |
| | | registrator: 'æå°é¾', |
| | | qualified: '0', |
| | | applier: 'æå°é¾', |
| | | checker: 'æå°é¾', |
| | | checktime: '2023-12-09' |
| | | },{ |
| | | applicationnum: 'QC22-09155', |
| | | checktype: 'åæææ£éª', |
| | | checkstate: '0', |
| | | deliverydate: '2023-07-31', |
| | | provider: 'å½ç½å±±ä¸ççµåæéå
¬å¸', |
| | | rawcode: '1010010090124', |
| | | rawname: 'éå
é¢ç»çº¿', |
| | | modelandspecification: 'JLHA1/G1A-185/30-27/7', |
| | | unit: 'ml/kg', |
| | | amount: '1999', |
| | | registrationdate: '2022-09-23', |
| | | registrator: 'æå°é¾', |
| | | qualified: null, |
| | | applier: 'æå°é¾', |
| | | checker: 'æå°é¾', |
| | | checktime: '2023-12-09' |
| | | },{ |
| | | applicationnum: 'QC22-09155', |
| | | checktype: 'åæææ£éª', |
| | | checkstate: '1', |
| | | deliverydate: '2023-07-31', |
| | | provider: 'å½ç½å±±ä¸ççµåæéå
¬å¸', |
| | | rawcode: '1010010090124', |
| | | rawname: 'éå
é¢ç»çº¿', |
| | | modelandspecification: 'JLHA1/G1A-185/30-27/7', |
| | | unit: 'ml/kg', |
| | | amount: '1999', |
| | | registrationdate: '2022-09-23', |
| | | registrator: 'æå°é¾', |
| | | qualified: '1', |
| | | applier: 'æå°é¾', |
| | | checker: 'æå°é¾', |
| | | checktime: '2023-12-09' |
| | | specifications_models: "GGXH-AAAAA", |
| | | inspectionTime: "2023-08-03", |
| | | id: 2, |
| | | samples_number: 0, |
| | | dateSurvey: "2023-08-03", |
| | | entrusted: "é¿éå·´å·´", |
| | | completionDeadline: "2023-08-03", |
| | | contacts: "å°é»", |
| | | entrust_coding: "SL20230803000003", |
| | | sample_name: "å卿º", |
| | | inspection_status: 1 |
| | | }], |
| | | infoForm:{ |
| | | finishedTable: { |
| | | deliverydate: '', |
| | | provider: '', |
| | | supplier: '', |
| | | code: '', |
| | | name: '', |
| | | modelandspecification: '', |
| | | unit: '', |
| | | amount: '', |
| | | checkdate: '' |
| | | checkdate: [] |
| | | }, |
| | | infoForm:'', |
| | | commisionSelection:{ |
| | | entrust_coding: '', |
| | | entrusted: '', |
| | | samples_number: '', |
| | | sample_name: '', |
| | | specifications_models: '', |
| | | dateSurvey: '', |
| | | completionDeadline: '', |
| | | contacts: '', |
| | | inspectionTime: '' |
| | | }, |
| | | typeoptions:[{ |
| | | value: 0, |
| | | label:'åæææ£éª' |
| | | },{ |
| | | value: 1, |
| | | label: 'å§ææ£éª' |
| | | },{ |
| | | value: 2, |
| | | label: 'æåæ£éª' |
| | | }], |
| | | stateoptions:[{ |
| | | value: 0, |
| | | label:'ä¸åæ ¼' |
| | | },{ |
| | | value: 1, |
| | | label:'åæ ¼' |
| | | }], |
| | | options:[{ |
| | | value: '0', |
| | | label: 'é项1' |
| | |
| | | }], |
| | | currentPage: 1, |
| | | total: 20, // æ»æ¡æ° |
| | | pageSize: 10, // æ¯é¡µçæ°æ®æ¡æ° |
| | | pageSize: 5, // æ¯é¡µçæ°æ®æ¡æ° |
| | | radioValue: 'å
¨é¨', |
| | | checkTypeVisible: false, |
| | | type: 0 |
| | | type: '', // é»è®¤ä¸éä¸çç¶æ |
| | | rawmaterialVisible: false, |
| | | commisionVisible: false, |
| | | tmp: '' |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | deep: true |
| | | } |
| | | }, |
| | | // beforeRouteEnter(to, from, next) { |
| | | // console.log(to, from) |
| | | // next() |
| | | // // 卿¸²æè¯¥ç»ä»¶ç对åºè·¯ç±è¢« confirm åè°ç¨ |
| | | // // ä¸ï¼è½ï¼è·åç»ä»¶å®ä¾ `this` |
| | | // // å 为å½é©åæ§è¡åï¼ç»ä»¶å®ä¾è¿æ²¡è¢«å建 |
| | | // }, |
| | | // beforeRouteUpdate(to, from, next) { |
| | | // console.log(to, from) |
| | | // if (to.name === 'ForInspectionDetail') this.showDetail = true |
| | | // this.$nextTick(() => { |
| | | // console.log(1) |
| | | // this.showDetail = true |
| | | // }) |
| | | // next() |
| | | // // å¨å½åè·¯ç±æ¹åï¼ä½æ¯è¯¥ç»ä»¶è¢«å¤ç¨æ¶è°ç¨ |
| | | // // 䏾便¥è¯´ï¼å¯¹äºä¸ä¸ªå¸¦æå¨æåæ°çè·¯å¾ /foo/:idï¼å¨ /foo/1 å /foo/2 ä¹é´è·³è½¬çæ¶åï¼ |
| | | // // ç±äºä¼æ¸²æåæ ·ç Foo ç»ä»¶ï¼å æ¤ç»ä»¶å®ä¾ä¼è¢«å¤ç¨ãèè¿ä¸ªé©åå°±ä¼å¨è¿ä¸ªæ
åµä¸è¢«è°ç¨ã |
| | | // // å¯ä»¥è®¿é®ç»ä»¶å®ä¾ `this` |
| | | // }, |
| | | created() { |
| | | this.getInspectionTableData() |
| | | this.selectInspectsList() |
| | | }, |
| | | updated() { |
| | | if (this.$route.name === 'ForInspectionDetail') this.showDetail = true |
| | | }, |
| | | methods: { |
| | | async getInspectionTableData() { |
| | | const res = await getInspectionList({ pageSize: this.currentPage, countSize: this.pageSize }) |
| | | async selectInspectsList() { |
| | | // è·åå页å表 |
| | | const res = await selectInspectsList({ countSize: this.pageSize, pageSize: this.currentPage }) |
| | | // this.inspectionTable = data |
| | | console.log(res) |
| | | // console.log(res.data.row) |
| | | const data = res.data.row |
| | | data.forEach((item) => { |
| | | var formTime = item["DATE_FORMAT(`form_time`,'%Y-%m-%d')"] |
| | | var startTime = item["DATE_FORMAT(i"]["`start_time`,'%Y-%m-%d')"] |
| | | var endTime = item["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"] |
| | | var checkdate = startTime + '~' + endTime |
| | | var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%m-%d')"] |
| | | item['formTime'] = formTime // æ¥ææ¥æ |
| | | item['checkdate'] = checkdate // æ£éªæ¥æ |
| | | item['createTime'] = createTime // ç»è®°æ¥æ |
| | | }) |
| | | this.inspectionTable = data |
| | | this.total = res.data.total |
| | | }, |
| | | goToForInspectionDetail() { |
| | | this.$router.push('/rawMaterials/reportForInspection/forInspectionDetail') |
| | | }, |
| | | handleClick(row) { |
| | | console.log(row) |
| | | }, |
| | | async searchInspections(){ |
| | | const res = await selectInspectsList({countSize:this.pageSize,pageSize:this.currentPage,message:this.searchData.applicationnumber}) |
| | | var data = res.data.row |
| | | data.forEach((item) => { |
| | | var formTime = item["DATE_FORMAT(`form_time`,'%Y-%m-%d')"] |
| | | var startTime = item["DATE_FORMAT(i"]["`start_time`,'%Y-%m-%d')"] |
| | | var endTime = item["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"] |
| | | var checkdate = startTime + '~' + endTime |
| | | var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%m-%d')"] |
| | | item['formTime'] = formTime // æ¥ææ¥æ |
| | | item['checkdate'] = checkdate // æ£éªæ¥æ |
| | | item['createTime'] = createTime // ç»è®°æ¥æ |
| | | }) |
| | | console.log('data:',data) |
| | | this.inspectionTable = data |
| | | if(this.searchData.type !== ''){ |
| | | if(this.searchData.state !== ''){ |
| | | this.inspectionTable = data.filter((item)=>{ |
| | | return item.type===this.searchData.type && item.inspection_status === this.searchData.state |
| | | }) |
| | | }else{ |
| | | this.inspectionTable = data.filter((item)=>{ |
| | | return item.type===this.searchData.type |
| | | }) |
| | | } |
| | | }else{ |
| | | if(this.searchData.state !== ''){ |
| | | this.inspectionTable = data.filter((item)=>{ |
| | | return item.inspection_status===this.searchData.state |
| | | }) |
| | | } |
| | | } |
| | | this.total = this.inspectionTable.length |
| | | }, |
| | | reset(){ |
| | | this.searchData = { |
| | | applicationnumber: '', |
| | | type: '', |
| | | state: '' |
| | | } |
| | | this.selectInspectsList() |
| | | }, |
| | | //被éä¸çä¿¡æ¯ åé |
| | | handleSelectionChange(val) { |
| | | if (val.length > 1) { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | this.$refs.multipleTable.toggleRowSelection(val.pop()) |
| | | } |
| | | this.tmp = val[0] |
| | | }, |
| | | handleCommisionSelection(){ |
| | | this.commisionSelection = this.tmp |
| | | this.commisionVisible = false |
| | | }, |
| | | handleRawMaterialSelection(){ |
| | | this.infoForm = this.tmp |
| | | this.rawmaterialVisible = false |
| | | }, |
| | | async handleRadioChange(){ |
| | | console.log(this.type) |
| | | if(this.type === 0){ |
| | | // åæææ¥æ£ |
| | | this.rawmaterialVisible = true |
| | | const res = await selectAll({type: this.type}) |
| | | var data = res.data |
| | | data.forEach((item)=>{ |
| | | var checkdate = [] |
| | | checkdate.push(item['createTime']) |
| | | checkdate.push(item['updateTime']) |
| | | item['checkdate'] = checkdate // æ£éªæ¥æ |
| | | }) |
| | | this.rawMaterialTable = data |
| | | }else if(this.type === 1){ |
| | | this.commisionVisible = true |
| | | const res = await selectAll({type: this.type}) |
| | | var data = res.data |
| | | data.forEach((item)=>{ |
| | | var checkdate = [] |
| | | checkdate.push(item['startTime']) |
| | | checkdate.push(item['endTime']) |
| | | item['checkdate_'] = item['startTime'] + '~' + item['endTime'] |
| | | item['checkdate'] = checkdate // æ£éªæ¥æ |
| | | }) |
| | | this.commisionTable = res.data |
| | | } |
| | | }, |
| | | // æ°å¢æ£éª |
| | | async addInspection(){ |
| | | if(this.type === 0){ |
| | | await addInspect({endTime: this.infoForm.checkdate[1], |
| | | formTime: this.infoForm.dateSurvey, |
| | | mcode: this.infoForm.materialCoding, |
| | | name: this.infoForm.materialName, |
| | | num: this.infoForm.quantity, |
| | | specifications: this.infoForm.specificationsModels, |
| | | startTime: this.infoForm.checkdate[0] , |
| | | supplier: this.infoForm.supplierName, |
| | | type: this.type, |
| | | unit: this.infoForm.unit}) |
| | | } |
| | | if(this.type === 1){ |
| | | console.log(this.commisionSelection) |
| | | const res = await addInspect({endTime: this.commisionSelection.checkdate[1], |
| | | formTime: this.commisionSelection.formTime, |
| | | mcode: this.commisionSelection.mcode, |
| | | name: this.commisionSelection.name, |
| | | num: this.commisionSelection.num, |
| | | specifications: this.commisionSelection.specifications, |
| | | startTime: this.commisionSelection.checkdate[0] , |
| | | supplier: this.commisionSelection.supplier, |
| | | type: this.type, |
| | | unit: this.commisionSelection.unit}) |
| | | console.log('res',res) |
| | | } |
| | | if(this.type === 2){ |
| | | console.log(this.finishedTable) |
| | | const res = await addInspect({ endTime: '2023-08-15', |
| | | formTime: this.finishedTable.deliverydate, |
| | | mcode: this.finishedTable.code, |
| | | name: this.finishedTable.name, |
| | | num: parseInt(this.finishedTable.amount), |
| | | specifications: this.finishedTable.modelandspecification, |
| | | startTime: '2023-08-14', |
| | | supplier: this.finishedTable.supplier, |
| | | type: this.type, |
| | | unit: this.finishedTable.unit }) |
| | | } |
| | | this.type = '' |
| | | this.checkTypeVisible = false |
| | | this.$message({ |
| | | message: 'æ·»å æåï¼', |
| | | type: 'success' |
| | | }); |
| | | }, |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | console.log(`æ¯é¡µ ${val} æ¡`) |
| | | this.currentPage = 1 |
| | | // this.currentPage = 1 |
| | | this.pageSize = val |
| | | this.selectInspectsList() |
| | | }, |
| | | // å½å页æ¹åæ¶è§¦å 跳转å
¶ä»é¡µ |
| | | handleCurrentChange(val) { |
| | | console.log(`å½å页: ${val}`) |
| | | this.currentPage = val |
| | | this.selectInspectsList() |
| | | } |
| | | } |
| | | } |
| | |
| | | .library-table{ |
| | | background-color: #fff; |
| | | flex: 1; |
| | | max-width: 100%; |
| | | margin-left: -15px; |
| | | margin-right: -15px; |
| | | margin-top: 50px; |
| | |
| | | flex-direction: column; |
| | | .el-table { |
| | | flex: 1; |
| | | .tag{ |
| | | width: 80px; |
| | | } |
| | | } |
| | | >div:nth-child(2){ |
| | | display: flex; |
| | |
| | | } |
| | | } |
| | | } |
| | | .infoForm{ |
| | | .checkTypeForm{ |
| | | margin-top: 30px; |
| | | margin-left: 50px; |
| | | .el-row{ |
| | | margin-bottom: 10px; |
| | | } |
| | | } |
| | | .pagination{ |
| | | display: flex; |
| | | margin-top: 20px; |
| | | justify-content: end; |
| | | } |
| | | .dialog-footer{ |
| | | display: flex; |
| | | margin-top: 20px; |
| | | justify-content: end; |
| | | } |
| | | </style> |
| | | |