| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737 |
- <!-- 检验委托-成品 -->
- <template>
- <div class="examination">
- <div class="common-head-search">
- <el-form :inline="true">
- <el-form-item label="委托单位">
- <el-select v-model="search.planCompanyNo" clearable filterable collapse-tags size="small"
- style="width: 200px; margin-right: 10px" placeholder="请选择查询内容">
- <el-option v-for="item in entrOrgNameType" :key="item.baseName" :label="item.orgName" :value="item.orgCode">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="物料名称">
- <el-input v-model="search.matName" size="small" @keyup.enter.native="searchData()" placeholder="请输入查询内容"
- style="width: 200px; margin-right: 10px"></el-input>
- </el-form-item>
- <el-form-item label="批次号">
- <el-input v-model="search.batchNo" size="small" @keyup.enter.native="searchData()" placeholder="请输入查询内容"
- style="width: 200px; margin-right: 10px"></el-input>
- </el-form-item>
- <el-form-item label="委托编号">
- <el-input v-model="search.carNo" size="small" @keyup.enter.native="searchData()" placeholder="请输入查询内容"
- style="width: 200px; margin-right: 10px" clearable></el-input>
- </el-form-item>
- <el-form-item label="中心编号">
- <el-input v-model="search.sampleNo" size="small" @keyup.enter.native="searchData()" placeholder="请输入查询内容"
- style="width: 200px; margin-right: 10px" clearable></el-input>
- </el-form-item>
- <el-form-item label="委托日期">
- <el-date-picker v-model="search.times" type="daterange" range-separator="至" start-placeholder="开始日期"
- end-placeholder="结束日期" size="small" style="width: 300px" format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"></el-date-picker>
- <!-- <el-date-picker
- v-model="search.times"
- type="daterange"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- size="small"
- style="width: 300px"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker> -->
- </el-form-item>
- <el-form-item>
- <el-button icon="el-icon-search" type="goon" size="mini" @click="searchData">查询</el-button>
- <el-button icon="el-icon-refresh" type="info" plain size="mini" @click="reset">重置</el-button>
- </el-form-item>
-
- <el-input v-model="values" ref="autoInput" size="mini" style="display: inline-block; width: 150px"
- @input="autoSubmit()" placeholder="扫码接收" clearable :disabled="inputLoading"></el-input>
- </el-form>
- </div>
- <el-row>
- <el-col :span="14">
- <el-tabs v-model="activeName" type="border-card">
- <el-tab-pane label="有效委托" name="first">
- <div class="common-title-div" style="height: auto; margin-top: -10px">
- <div class="common-title-name" style="width: 280px">
- <img style="width: 25px; height: 25px" src="../../../../assets/img/imgScreen/logo.png" />
- 检验委托信息
- </div>
- <el-button icon="el-icon-search" style="height: 100%; margin-left: -220px; margin-top: 28px" type="goon"
- size="mini" @click="countList">物料统计</el-button>
- <div>
- <el-button icon="el-icon-circle-plus-outline" type="goon" size="mini" v-privilege="activeMenu + 'add'"
- @click="addData" style="border: 3px">新增</el-button>
- <!-- <el-button icon="el-icon-edit" type="goon" size="mini" @click="modifyData">修改</el-button> -->
- <el-button icon="el-icon-check" type="goon" size="mini" :loading="subLoading"
- v-privilege="activeMenu + 'submit'" @click="submitData" style="border: 3px">提交</el-button>
- <el-button icon="el-icon-edit" type="goon" size="mini" v-privilege="activeMenu + 'PUT'"
- @click="modifyData" style="border: 3px">修改</el-button>
- <el-button icon="el-icon-check" type="goon" size="mini" :loading="subLoading8" @click="updateSampleNo"
- style="border: 3px">修改委托编号</el-button>
- <el-button icon="el-icon-back" type="danger" size="mini" :loading="subLoading"
- v-privilege="activeMenu + 'submit'" @click="cancelData" style="margin-top: 2px">取消提交</el-button>
- <el-button icon="el-icon-back" type="danger" size="mini" :loading="subLoading"
- v-privilege="activeMenu + 'submit'" @click="disable" style="border: 3px">停用</el-button>
- <el-button icon="el-icon-download" type="goon" size="mini" :loading="exportFileLoading"
- @click="exportFile">导出检测委托书</el-button>
- <el-button icon="el-icon-edit-outline" type="goon" size="mini" :loading="false"
- @click="showQRCodeInfo">编辑二维码</el-button>
- <el-button icon="el-icon-printer" type="goon" size="mini" :loading="printLoading" @click="printQRCode"
- style="border: 3px">打印标签</el-button>
- </div>
- </div>
- <div class="common-table-div" style="margin-bottom: 0; margin-top: 0">
- <el-table id="excelTable" v-loading="dataLoading" ref="dataTable" border :height="height_top"
- highlight-current-row @row-click="saveDataMain" :data="table.list" :icore-filter-flag="icoreFilterFlag"
- :header-cell-style="tableHeaderCellStyle" @cell-click="searchFollow" @selection-change="selectRow"
- :cell-class-name="tableRowClassName" :summary-method="getSummaries" show-summary>
- <el-table-column type="index" label="NO" fixed="left" width="35" align="center"></el-table-column>
- <el-table-column type="selection" width="45" fixed="left" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="60px" prop="stateFlag1" label="状态"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="carNo" label="委托编号"
- align="center">
- <template slot-scope="{ row }">
- <el-input v-model="row.carNo" size="small" style="width: 100%">
- </el-input>
- </template>
- </el-table-column>
- <!-- <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="entrId" label="委托编号" align="center"></el-table-column> -->
- <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="sampleNo" label="中心编号"
- align="center"></el-table-column>
- <!-- <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="id" label="编号" align="center"></el-table-column> -->
- <!-- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="planCompanyName" label="委托单位" align="center"></el-table-column> -->
- <el-table-column sortable :show-overflow-tooltip="true" min-width="125px" prop="matName" label="物料名称"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="entrTime1" label="委托日期"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="memo" label="备注"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="planCompanyName"
- label="生产单位" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="planDeptName"
- label="生产车间" align="center"></el-table-column>
- <!-- <el-table-column
- sortable
- :show-overflow-tooltip="true"
- min-width="150px"
- prop="batchNo"
- label="批次号"
- align="center"
- >
- <template slot-scope="{ row }">
- <el-input
- v-if="row.stateFlag == '0'"
- v-model="row.batchNo"
- size="small"
- style="width: 100%"
- >
- </el-input>
- <span v-else>{{ row.batchNo }}</span>
- </template>
- </el-table-column> -->
- <!-- <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="entrTypeName" label="委托类型" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="sampleTypeName" label="样品类型" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="gradeName" label="牌号" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="matClassName" label="物料分类" align="center"></el-table-column> -->
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="testTypeName"
- label="检验类型" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="smpDeliName"
- label="取样频次" align="center"></el-table-column>
- <!-- <el-table-column
- sortable
- :show-overflow-tooltip="true"
- min-width="80px"
- prop="gradeName"
- label="牌号"
- align="center"
- ></el-table-column> -->
- <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="matShapeName"
- label="试样形状" align="center"></el-table-column>
- <!-- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="anlyItemName" label="分析项目" align="center"></el-table-column> -->
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="companyName"
- label="检验单位" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="deptName" label="检验车间"
- align="center"></el-table-column>
- <el-table-column :show-overflow-tooltip="true" sortable min-width="140px" prop="sectionName"
- label="检验班组" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="smpCompanyName"
- label="取样单位" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="smpDeptName"
- label="取样车间" align="center"></el-table-column>
- <el-table-column :show-overflow-tooltip="true" sortable min-width="140px" prop="smpSectionName"
- label="取样班组" align="center"></el-table-column>
- <!-- <el-table-column
- sortable
- :show-overflow-tooltip="true"
- min-width="100px"
- prop="spec"
- label="规格"
- align="center"
- ></el-table-column> -->
- <!-- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="rollNo" label="轧批号" align="center"></el-table-column> -->
- <el-table-column sortable :show-overflow-tooltip="true" min-width="95px" prop="createMan" label="创建人"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="createTime" label="创建时间"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="95px" prop="updateMan" label="修改人"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="updateTime" label="修改时间"
- align="center"></el-table-column>
- </el-table>
- </div>
- <div class="common-foot-style">
- <el-pagination @size-change="pageSizeChange" @current-change="pageCurrentChange"
- :current-page="page.pageNum" :page-sizes="[100, 200, 500, 800, 1000]" :page-size="page.pageSize"
- layout="total, sizes, prev, pager, next, jumper" :total="page.totalPage" background>
- </el-pagination>
- </div>
- </el-tab-pane>
- <el-tab-pane label="停用委托" name="first1">
- <div class="common-title-div" style="height: auto; margin-top: -10px">
- <div class="common-title-name" style="width: 280px">
- <img style="width: 25px; height: 25px" src="../../../../assets/img/imgScreen/logo.png" />
- 检验委托信息
- </div>
- <div>
- <el-button icon="el-icon-check" type="goon" size="mini" :loading="subLoadingq"
- v-privilege="activeMenu + 'submit'" @click="enable" style="border: 3px">启用</el-button>
- <el-button icon="el-icon-check" type="goon" size="mini" :loading="subLoadingq"
- v-privilege="activeMenu + 'submit'" @click="removeNumber"
- style="border: 3px; margin-top: 3px">清除编号</el-button>
- </div>
- </div>
- <div class="common-table-div" style="margin-bottom: 0; margin-top: 0">
- <el-table id="invalidTable" v-loading="invalidLoading" ref="dataTable" border :height="height_top"
- highlight-current-row @row-click="saveDataMain" :data="table.list1" :icore-filter-flag="icoreFilterFlag"
- :header-cell-style="tableHeaderCellStyle" @cell-click="searchFollow" @selection-change="selectRow1"
- :cell-class-name="tableRowClassName" :summary-method="getSummaries" show-summary>
- <el-table-column type="index" label="NO" fixed="left" width="35" align="center"></el-table-column>
- <el-table-column type="selection" width="45" fixed="left" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="60px" prop="stateFlag1" label="状态"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="carNo" label="委托编号"
- align="center">
- <template slot-scope="{ row }">
- <el-input v-model="row.carNo" size="small" style="width: 100%">
- </el-input>
- </template>
- </el-table-column>
- <!-- <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="entrId" label="委托编号" align="center"></el-table-column> -->
- <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="sampleNo" label="中心编号"
- align="center"></el-table-column>
- <!-- <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="id" label="编号" align="center"></el-table-column> -->
- <!-- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="planCompanyName" label="委托单位" align="center"></el-table-column> -->
- <el-table-column sortable :show-overflow-tooltip="true" min-width="125px" prop="matName" label="物料名称"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="entrTime1" label="委托日期"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="memo" label="备注"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="planCompanyName"
- label="生产单位" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="planDeptName"
- label="生产车间" align="center"></el-table-column>
- <!-- <el-table-column
- sortable
- :show-overflow-tooltip="true"
- min-width="150px"
- prop="batchNo"
- label="批次号"
- align="center"
- >
- <template slot-scope="{ row }">
- <el-input
- v-if="row.stateFlag == '0'"
- v-model="row.batchNo"
- size="small"
- style="width: 100%"
- >
- </el-input>
- <span v-else>{{ row.batchNo }}</span>
- </template>
- </el-table-column> -->
- <!-- <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="entrTypeName" label="委托类型" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="sampleTypeName" label="样品类型" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="gradeName" label="牌号" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="matClassName" label="物料分类" align="center"></el-table-column> -->
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="testTypeName"
- label="检验类型" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="smpDeliName"
- label="取样频次" align="center"></el-table-column>
- <!-- <el-table-column
- sortable
- :show-overflow-tooltip="true"
- min-width="80px"
- prop="gradeName"
- label="牌号"
- align="center"
- ></el-table-column> -->
- <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="matShapeName"
- label="试样形状" align="center"></el-table-column>
- <!-- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="anlyItemName" label="分析项目" align="center"></el-table-column> -->
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="companyName"
- label="检验单位" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="deptName" label="检验车间"
- align="center"></el-table-column>
- <el-table-column :show-overflow-tooltip="true" sortable min-width="140px" prop="sectionName"
- label="检验班组" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="smpCompanyName"
- label="取样单位" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="120px" prop="smpDeptName"
- label="取样车间" align="center"></el-table-column>
- <el-table-column :show-overflow-tooltip="true" sortable min-width="140px" prop="smpSectionName"
- label="取样班组" align="center"></el-table-column>
- <!-- <el-table-column
- sortable
- :show-overflow-tooltip="true"
- min-width="100px"
- prop="spec"
- label="规格"
- align="center"
- ></el-table-column> -->
- <!-- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="rollNo" label="轧批号" align="center"></el-table-column> -->
- <el-table-column sortable :show-overflow-tooltip="true" min-width="95px" prop="createMan" label="创建人"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="createTime" label="创建时间"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="95px" prop="updateMan" label="修改人"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="updateTime" label="修改时间"
- align="center"></el-table-column>
- </el-table>
- </div>
- </el-tab-pane>
- </el-tabs>
- </el-col>
- <el-col :span="10">
- <el-tabs v-model="activeName2" type="border-card" class="testManagement_left">
- <el-tab-pane label="检验项目" name="first">
- <div class="common-title-div" style="height: 75px; margin-top: 25px">
- <div class="common-title-name">
- <img style="width: 25px; height: 25px" src="../../../../assets/img/imgScreen/logo.png" />
- 计划检验项目表
- </div>
- <div>
- <el-button icon="el-icon-circle-plus-outline" type="goon" size="mini"
- v-privilege="activeMenu + 'addDep'" @click="addData2">新增</el-button>
- <el-button icon="el-icon-remove-outline" type="danger" size="mini"
- v-privilege="activeMenu + 'deleteDep'" @click="deleteData2">删除</el-button>
- </div>
- </div>
- <div class="common-table-div" style="margin-bottom: 0; margin-top: 0">
- <el-table v-loading="dataLoading2" ref="dataTable2" border :height="height_bot" @row-click="saveData"
- highlight-current-row @selection-change="selectData" :data="table.list2"
- :icore-filter-flag="icoreFilterFlag" :header-cell-style="tableHeaderCellStyle"
- :cell-class-name="tableRowClassName2" :summary-method="getSummaries" show-summary>
- <el-table-column type="index" label="NO" fixed="left" align="center"></el-table-column>
- <el-table-column type="selection" width="45" fixed="left" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="90px" prop="anlyItemNo"
- label="分析项目编号" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="anlyItemName"
- label="分析项目" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="minSign" label="下限符"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="90px" prop="minValue" label="最小值"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="maxSign" label="上限符"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="90px" prop="maxValue" label="最大值"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="memo" label="备注"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="80px" prop="createMan" label="创建人"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="160px" prop="createTime" label="创建时间"
- align="center"></el-table-column>
- </el-table>
- </div>
- </el-tab-pane>
- <el-tab-pane label="接收电文" name="second">
- <div class="common-title-div" style="height: 75px; margin-top: 25px">
- <div class="common-title-name">
- <img style="width: 25px; height: 25px" src="../../../../assets/img/imgScreen/logo.png" />
- 接收电文
- </div>
- <div></div>
- </div>
- <div class="common-table-div" style="margin-bottom: 0; margin-top: 0">
- <el-table v-loading="dataLoading3" ref="dataTable3" border :height="height_bot" highlight-current-row
- :data="table.list3" :icore-filter-flag="icoreFilterFlag" :header-cell-style="tableHeaderCellStyle"
- :cell-class-name="tableRowClassName2" :summary-method="getSummaries" show-summary>
- <el-table-column type="index" label="NO" fixed="left" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="400px" prop="msgSource" label="电文内容"
- align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="100px" prop="createDate" label="创建时间"
- align="center"></el-table-column>
- </el-table>
- </div>
- </el-tab-pane>
- <el-tab-pane label="发送电文" name="three">
- <div class="common-title-div" style="height: 75px; margin-top: 25px">
- <div class="common-title-name">
- <img style="width: 25px; height: 25px" src="../../../../assets/img/imgScreen/logo.png" />
- 发送电文
- </div>
- <div></div>
- </div>
- <div class="common-table-div" style="margin-bottom: 0; margin-top: 0">
- <el-table v-loading="dataLoading4" ref="dataTable2" border :height="height_bot" highlight-current-row
- :data="table.list4" :icore-filter-flag="icoreFilterFlag" :header-cell-style="tableHeaderCellStyle"
- :cell-class-name="tableRowClassName2" :summary-method="getSummaries" show-summary>
- <el-table-column type="index" label="NO" fixed="left" align="center"></el-table-column>
- <el-table-column sortable :show-overflow-tooltip="true" min-width="600px" prop="msgSource" label="电文内容"
- align="center"></el-table-column>
- </el-table>
- </div>
- </el-tab-pane>
- </el-tabs>
- </el-col>
- </el-row>
- <div is="alertComponets" :showFlag="showFlag" :Params="Params" @refresh="refresh"></div>
- <div is="alertComponets2" :showFlag2="showFlag2" :Params="Params" :Params2="Params2" @refresh="refresh2"></div>
- <div is="alertComponets3" :showFlag="showFlag3" :Params="Params3" @refresh="refresh3"></div>
- <el-dialog @close="closeDialog" :visible.sync="dialogTableCount" width="80%">
- <el-table id="excelTable3" ref="dataTable3" border :data="tableCount">
- <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="MAT_NAME" label="物料编号"
- align="center"></el-table-column>
- <el-table-column :show-overflow-tooltip="true" sortable min-width="100px" prop="COUNT" label="个数"
- align="center"></el-table-column>
- </el-table>
- </el-dialog>
- <div id="printContainer2" style="margin-left: 20px; margin-top: 3px" v-show="false">
- <div id="printContent">
- <div v-for="item in printData" :key="item.id" style="width: 439px; border: 1px solid #fff; position: relative">
- <div>
- <div v-for="subItem in item.list" :key="subItem.id" style="font-size: 15px">
- {{ subItem.fieldKeyName }}:{{ subItem.fieldValue }}
- </div>
- <div :id="`Qrcode${item.id}`" style="margin-top: 20px"></div>
- <div v-if="printData.length > 1" style="page-break-after: always"></div>
- </div>
- </div>
- </div>
- </div>
- <!-- 二维码编辑 -->
- <el-dialog title="二维码信息详情" :visible.sync="isShowQrCodeInfo" width="70%">
- <el-button type="goon" size="mini" @click="addQrCodeInfo" style="margin-bottom: 10px">新增</el-button>
- <el-button type="goon" size="mini" @click="resetQrCodeInfo" style="margin-bottom: 10px">重置</el-button>
- <el-table ref="qrCodeInfoTable" :data="qrCodeInfoData" stripe border tooltip-effect="dark" height="500"
- @selection-change="handleQrCodeInfoSelectionChange">
- <el-table-column type="selection" width="55" align="center">
- </el-table-column>
- <el-table-column label="字段名" align="center" prop="fieldKeyName">
- </el-table-column>
- <el-table-column prop="fieldValue" label="字段值" align="center">
- </el-table-column>
- <el-table-column label="操作" width="120" align="center">
- <template slot-scope="scope">
- <el-button @click="editQrCodeInfoRow(scope.$index, scope.row)" type="text" size="small">
- 编辑
- </el-button>
- <el-button v-if="scope.row.fieldKey != 'sampleNo'" @click="delQrCodeInfoRow(scope.$index, scope.row)"
- type="text" size="small">
- 删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <div style="
- display: flex;
- align-items: center;
- justify-content: space-between;
- ">
- <div>
- <el-pagination @size-change="pageSizeChange3" @current-change="pageCurrentChange3"
- :current-page="page3.pageNum" :page-sizes="[10, 20, 30, 50, 100]" :page-size="page3.pageSize"
- layout="total, sizes, prev, pager, next, jumper" :total="page3.totalPage" background>
- </el-pagination>
- </div>
- <div>
- <el-button size="mini" @click="isShowQrCodeInfo = false">取消</el-button>
- <el-button size="mini" icon="el-icon-printer" type="primary" @click="saveQRCode">保存</el-button>
- <el-button size="mini" icon="el-icon-printer" type="primary" @click="saveAndPrintQRCode">保存打印二维码</el-button>
- </div>
- </div>
- </div>
- </el-dialog>
- <!-- 新增二维码字段 -->
- <el-dialog title="新增二维码字段信息" :visible.sync="isShowAddQrCodeInfo" width="30%">
- <el-form :model="addQrCodeInfoForm">
- <el-form-item label="字段名">
- <el-input v-model="addQrCodeInfoForm.fieldKeyName" auto-complete="off"></el-input>
- </el-form-item>
- <el-form-item label="字段值">
- <el-input v-model="addQrCodeInfoForm.fieldValue" auto-complete="off"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button size="mini" @click="isShowAddQrCodeInfo = false">取消</el-button>
- <el-button size="mini" type="primary" @click="confirmAddQrCodeInfo">确定</el-button>
- </div>
- </el-dialog>
- <!-- 编辑二维码字段 -->
- <el-dialog title="编辑二维码字段信息" :visible.sync="isShowEditQrCodeInfo" width="30%">
- <el-form :model="editQrCodeInfoForm">
- <el-form-item label="字段名">
- <el-input v-model="editQrCodeInfoForm.fieldKeyName" auto-complete="off"></el-input>
- </el-form-item>
- <el-form-item label="字段值">
- <el-input v-model="editQrCodeInfoForm.fieldValue" auto-complete="off"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button size="mini" @click="isShowEditQrCodeInfo = false">取消</el-button>
- <el-button size="mini" type="primary" @click="confirmEditQrCodeInfo">确定</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import { getCookie, formatDate } from "@/utils/util.js";
- import { cookieUserId, cookieUserName } from "@/config/config.js";
- import alertComponets from "./alertComponents";
- import alertComponets2 from "./alertComponents2";
- import alertComponets3 from "./alertComponents3";
- import JsBarcode from "jsbarcode";
- let userName = getCookie(cookieUserName);
- let userId = getCookie(cookieUserId);
- export default {
- components: { alertComponets, alertComponets2, alertComponets3 },
- data() {
- return {
- table: {
- list: [],
- list1: [],
- list2: [],
- list3: [],
- list4: [],
- },
- activeName: "first",
- activeName2: "first",
- dataLoading: false,
- invalidLoading: false,
- dataLoading2: false,
- dataLoading3: false,
- dataLoading4: false,
- subLoading: false,
- subLoading1: false,
- subLoading2: false,
- subLoading3: false,
- subLoadingq: false,
- icoreFilterFlag: true,
- values: "",
- inputLoading: false,
- timeId: null,
- page: {
- pageSize: 200,
- pageNum: 1,
- totalPage: 0,
- },
- page3: {
- pageSize: 10,
- pageNum: 1,
- totalPage: 0,
- },
- saveRow: {},
- savaDep: {},
- list: [],
- entrId: "",
- showFlag: false,
- showFlag3: false,
- Params3: {},
- Params: {},
- showFlag2: false,
- Params2: {},
- entrOrgNameType: [],
- entrOrgNameType1: [],
- selectDataList: [],
- sampleTypeNameType: [],
- multipleSelection3: [],
- multipleSelection4: [],
- tableCount: [],
- dialogTableCount: false,
- search: {
- batchNo: "",
- entrTime: "",
- times: [],
- planCompanyName: "",
- matName: "",
- carNo: "",
- sampleNo: ""
- },
- height_top: 0,
- height_bot: 0,
- activeMenu: "",
- piciIndex: "",
- printData: [],
- printLoading: false,
- exportFileLoading: false,
- // editRow: {},
- selectRows: [],
- selectRow1s: [],
- subLoading8: false,
- isShowQrCodeInfo: false,
- qrCodeInfoData: [],
- isShowAddQrCodeInfo: false,
- addQrCodeInfoForm: {},
- isShowEditQrCodeInfo: false,
- editQrCodeInfoForm: {},
- editQrCodeInfoIndex: 0,
- deleteIds: [],
- isSetDefault: false,
- };
- },
- created() {
- this.height_top = window.innerHeight - 200;
- this.height_bot = window.innerHeight - 200;
- this.search.times = [this.getYNM(new Date()), this.getYNM(new Date())];
- this.activeMenu = window.top.localStorage.getItem("activeMenu");
- },
- mounted() {
- this.axios
- .post(
- "pass/baseManagement/v1/sysorgs/querySysOrgCompanyAll",
- {},
- { individualType: "json" }
- )
- .then((response) => {
- this.entrOrgNameType = response.data;
- });
- this.searchData();
- this.addScreen();
- this.addScreen2();
- },
- methods: {
- getYNM(date) {
- let year = date.getFullYear().toString();
- let month = date.getMonth() + 1;
- let day = date.getDate();
- month = month < 10 ? "0" + month : month;
- day = day < 10 ? "0" + day : day;
- return `${year}-${month}-${day}`;
- },
- getSummaries(param) {
- const { columns, data } = param;
- const sums = [];
- columns.forEach((column, index) => {
- if (index === 0) {
- sums[index] = "合计";
- }
- if (index === 1) {
- sums[index] = data.length;
- }
- });
- return sums;
- },
- refresh() {
- this.mainData();
- },
- refresh2() {
- this.depData(this.entrId);
- },
- refresh3() {
- this.mainData();
- },
- saveDataMain(row) {
- this.piciIndex = row.id;
- this.saveRow = Object.assign({}, row);
- },
- addData() {
- let _this = this;
- _this.showFlag = !_this.showFlag;
- _this.Params = null;
- },
- modifyData() {
- if (JSON.stringify(this.saveRow) === "{}") {
- this.$message.warning("请点击选中一条您要修改的数据");
- return;
- }
- if (this.saveRow.stateFlag == 1) {
- this.$message.warning("数据已提交,不可进行修改");
- return;
- }
- this.Params3 = this.saveRow;
- this.showFlag3 = !this.showFlag3;
- },
- update() {
- if (JSON.stringify(this.saveRow) === "{}") {
- this.$message.warning("请点击选中一条您要提交的数据");
- return;
- }
- if (this.saveRow.stateFlag == 1) {
- this.$message.warning("请选择编辑状态!");
- return;
- }
- let index = this.table.list.findIndex((arr) => arr.id == this.piciIndex);
- let arr = this.table.list[index];
- this.subLoading2 = true;
- this.axios
- .post(
- "pass/testManagement/v1/limstestentrusts/updateEntrustBatchNo",
- arr,
- { individualType: "json" }
- )
- .then((res) => {
- if (res.code == 0 || res.code == 200) {
- this.$message.success(res.message);
- this.mainData();
- } else {
- this.$message.error(res.message);
- }
- this.subLoading2 = false;
- })
- .catch((e) => {
- this.subLoading2 = false;
- this.$message.error(e.message);
- });
- },
- //清除中心编号的生成规则的记录
- removeNumber() {
- this.subLoadingq = true;
- this.axios
- .post("pass/testManagement/v1/api/reflection/removeMapPkALL")
- .then((res) => {
- if (res.code == 0 || res.code == 200) {
- this.subLoadingq = false;
- this.$message.success(res.message);
- } else {
- this.subLoadingq = false;
- this.$message.error(res.message);
- }
- });
- },
- updateSampleNo() {
- if (this.selectRows.length == 0) {
- return this.$message.warning("请至少勾选一条您要修改的数据!");
- }
- this.subLoading8 = true;
- this.axios
- .post(
- "pass/testManagement/v1/limstestentrusts/saveLimsTestEntrustList",
- this.selectRows,
- { individualType: "json" }
- )
- .then((res) => {
- if (res.succeed) {
- this.subLoading8 = false;
- this.$message.success("修改成功");
- this.searchData();
- } else {
- this.subLoading8 = false;
- this.$message.error(res.message);
- }
- })
- .catch((e) => {
- this.subLoading8 = false;
- this.$message.error(e.message);
- });
- }, //扫码提交
- autoSubmit() {
- if (!this.values) {
- this.$message.warning("请先用扫码枪扫描标签");
- return;
- }
- if (!this.timeId) {
- this.timeId = setTimeout(() => {
- this.inputLoading = true;
- this.axios
- .post(
- "pass/testManagement/v1/limstestentrusts/scanningSubmit",
- { carNo: this.values },
- { individualType: "json" }
- )
- .then((res) => {
- if (res.code == 0 || res.code == 200) {
- this.$nextTick(() => {
- this.$refs.autoInput.focus();
- });
- this.values = "";
- this.inputLoading = false;
- this.$message.success("操作成功!");
- this.mainData();
- } else {
- this.$nextTick(() => {
- this.$refs.autoInput.focus();
- });
- this.values = "";
- this.inputLoading = false;
- this.$message.error(res.message);
- }
- })
- .catch((e) => {
- this.$nextTick(() => {
- this.$refs.autoInput.focus();
- });
- this.values = "";
- this.inputLoading = false;
- this.$message.error(e.message);
- });
- this.timeId = null;
- }, 1000);
- }
- },
- exportFile() {
- if (this.selectRows.length == 0) {
- this.$message.warning("请勾选您要导出的一条数据!");
- return;
- }
- this.exportFileLoading = true;
- let str = [];
- this.selectRows.forEach((s) => {
- str.push(s.entrId);
- });
- this.axios
- .get(
- "pass/testManagement/v1/limstestentrusts/newJywts/" + str,
- { responseType: "blob" },
- { headers: { "content-type": "application/x-www-form-urlencoded" } }
- )
- .then((res) => {
- let blob = new Blob([res]);
- let elink = document.createElement("a");
- elink.download = "BBWXCLJC-4-08-03.docx";
- elink.style.display = "none";
- elink.target = "_blank";
- elink.href = URL.createObjectURL(blob);
- document.body.appendChild(elink);
- elink.click();
- URL.revokeObjectURL(elink.href); // 释放URL对象
- document.body.removeChild(elink);
- this.exportFileLoading = false;
- })
- .catch((e) => {
- this.exportFileLoading = false;
- return this.$message.error(e.message);
- });
- },
- // 打印二维码
- // printQRCode() {
- // if (this.selectRows.length == 0) {
- // this.$message.warning("请勾选您要打印的数据");
- // return;
- // }
- // let flag = this.selectRows.some((u) => u.stateFlag != 1);
- // if (flag) {
- // return this.$message.warning(
- // "未提交数据不允许进行打印,请重新进行勾选"
- // );
- // }
- // let entrIds = [];
- // this.selectRows.forEach((p) => {
- // entrIds.push(p.entrId);
- // });
- // this.axios
- // .post(
- // "pass/testManagement/v1/limssampleinfos/queryLimsSampleInfosPage",
- // { object: { entrIds }, pageIndex: 1, pageSize: 200 },
- // { individualType: "json" }
- // )
- // .then((res) => {
- // if (res.code == 0 || res.code == 200) {
- // this.$message.success(res.message);
- // this.printData = res.data.list;
- // this.printData.forEach((item) => {
- // item.carNo = this.saveRow.carNo;
- // });
- // this.runPrint(this.printData);
- // this.searchData();
- // } else {
- // this.$message.error(res.message);
- // }
- // });
- // },
- // runPrint(arr) {
- // console.log("arr", arr);
- // setTimeout(() => {
- // arr.forEach((item) => {
- // const qrcode = document.getElementById(`Qrcode${item.id}`);
- // qrcode.innerHTML = "";
- // new QRCode(qrcode, {
- // text: item.sampleNo,
- // width: 100,
- // height: 100,
- // colorDark: "#000000",
- // colorLight: "#ffffff",
- // });
- // });
- // setTimeout(() => {
- // this.printPage("printContent");
- // }, 1500);
- // }, 100);
- // },
- // 打印条形码
- async printQRCode() {
- if (this.selectRows.length == 0) {
- this.$message.warning("请勾选您要打印的数据");
- return;
- }
- let flag = this.selectRows.some((u) => u.stateFlag != 1);
- if (flag) {
- return this.$message.warning(
- "未提交数据不允许进行打印,请重新进行勾选"
- );
- }
- let entrIds = [];
- this.selectRows.forEach((p) => {
- entrIds.push(p.entrId);
- });
- const list0 = [];
- entrIds.forEach((item) => {
- list0.push(this.initQrCode(item));
- });
- await Promise.all(list0);
- const list = [];
- entrIds.forEach((item) => {
- list.push(this.getQrCodeInfoListById(item));
- });
- Promise.all(list).then((res) => {
- this.printData = res.map((item, index) => {
- if (item.code == 0 || item.code == 200) {
- return {
- id: entrIds[index],
- list: item.data.list.filter((subItem) => subItem.isCheck === 1),
- };
- } else {
- return {
- id: entrIds[index],
- list: [],
- };
- }
- });
- console.log("this.printData");
- console.log(this.printData);
- this.runPrint(this.printData);
- });
- },
- runPrint(arr) {
- setTimeout(() => {
- arr.forEach((item) => {
- const qrcode = document.getElementById(`Qrcode${item.id}`);
- qrcode.innerHTML = "";
- let sampleNo = "";
- for (let i = 0; i < item.list.length; i++) {
- if (item.list[i].fieldKey === "sampleNo") {
- sampleNo = item.list[i].fieldValue;
- break;
- }
- }
- new QRCode(qrcode, {
- text: sampleNo,
- width: 100,
- height: 100,
- colorDark: "#000000",
- colorLight: "#ffffff",
- });
- });
- setTimeout(() => {
- this.printPage("printContent");
- }, 1500);
- }, 100);
- },
- getpici() {
- if (JSON.stringify(this.saveRow) === "{}") {
- this.$message.warning("请点击选中一条您要提交的数据");
- return;
- }
- if (this.saveRow.stateFlag == 1) {
- this.$message.warning("请选择编辑状态!");
- return;
- }
- this.subLoading1 = true;
- this.axios
- .post(
- "pass/testManagement/v1/limstestentrusts/getNextBacthNoToRule",
- this.saveRow,
- { individualType: "json" }
- )
- .then((res) => {
- if (res.code == 0 || res.code == 200) {
- let index = this.table.list.findIndex(
- (arr) => arr.id == this.piciIndex
- );
- if (res.data != null) {
- this.table.list[index].batchNo = res.data;
- }
- this.saveRow.batchNo = res.data;
- } else {
- this.$message.error(res.message);
- }
- this.subLoading1 = false;
- })
- .catch((e) => {
- this.subLoading1 = false;
- this.$message.error(e.message);
- });
- },
- async submitData() {
- if (this.selectRows.length == 0) {
- return this.$message.warning("请至少勾选一条数据进行提交!");
- }
- let ids = [];
- for (let i = 0; i < this.selectRows.length; i++) {
- let item = this.selectRows[i];
- if (item.stateFlag === "1") {
- return this.$message.warning(
- "委托编号为[" + item.id + "]的数据已经提交,无法再次进行提交!"
- );
- }
- if (item.validFlag === "1") {
- ids.push(item.id);
- }
- }
- this.subLoading = true;
- for (let i = 0; i < this.selectRows.length; i++) {
- let item = this.selectRows[i];
- const str = await this.axios.post(
- "pass/testManagement/v1/limstestentrusts/saveLimsTestEntrust",
- item,
- { individualType: "json" }
- );
- if (str.succeed) {
- const str1 = await this.axios.post(
- "pass/testManagement/v1/limstestentrusts/submit",
- [item.entrId],
- { individualType: "json" }
- );
- if (str1.code == 0 || str1.code == 200) {
- this.$message.success(str1.message);
- } else {
- this.$message.error(str1.message);
- }
- } else {
- this.$message.error(str.message);
- }
- }
- this.subLoading = false;
- this.refresh();
- },
- selectData(val) {
- this.selectDataList = val;
- },
- saveData(row) {
- this.savaDep = Object.assign({}, row);
- },
- addData2() {
- if (JSON.stringify(this.saveRow) === "{}") {
- this.$message.warning("请点击选中一条检验委托信息数据");
- return;
- }
- if (this.saveRow.stateFlag == 1) {
- this.$message.warning("数据已提交,不可进行新增");
- return;
- }
- this.showFlag2 = !this.showFlag2;
- this.Params2 = null;
- this.Params = this.saveRow;
- },
- enable() {
- //启用
- if (this.selectRow1s.length < 1) {
- this.$message.warning("请至少勾选一条您要启用的数据");
- return;
- }
- // if (this.saveRow.validFlag != 0) {
- // this.$message.warning('数据未停用,不可启用!')
- // return
- // }
- let ids = [];
- for (let i = 0; i < this.selectRow1s.length; i++) {
- let item = this.selectRow1s[i];
- if (item.validFlag === "1") {
- return this.$message.warning(
- "委托编号为[" + item.id + "]的数据为启用状态,无法进行启用!"
- );
- }
- if (item.validFlag === "0") {
- ids.push(item.id);
- }
- }
- this.subLoadingq = true;
- this.axios
- .post("pass/testManagement/v1/limstestentrusts/enable", ids, {
- individualType: "json",
- })
- .then((res) => {
- if (res.code == 0 || res.code == 200) {
- this.mainData();
- this.mainData1();
- this.subLoadingq = false;
- this.$message.success(res.message);
- } else {
- this.subLoadingq = false;
- this.$message.error(res.message);
- }
- })
- .catch((e) => {
- this.subLoadingq = false;
- this.$message.error(e.message);
- });
- },
- disable() {
- //停用
- if (this.selectRows.length < 1) {
- this.$message.warning("请至少勾选一条您要停用的数据");
- return;
- }
- let ids = [];
- for (let i = 0; i < this.selectRows.length; i++) {
- let item = this.selectRows[i];
- if (item.validFlag === "0") {
- return this.$message.warning(
- "委托编号为[" + item.id + "]的数据为停用状态,无法进行停用!"
- );
- }
- if (item.validFlag === "1") {
- ids.push(item.id);
- }
- }
- this.subLoading = true;
- this.axios
- .post("pass/testManagement/v1/limstestentrusts/disable", ids, {
- individualType: "json",
- })
- .then((res) => {
- if (res.code == 0 || res.code == 200) {
- this.$message.success(res.message);
- this.mainData();
- this.mainData1();
- this.subLoading = false;
- } else {
- this.subLoading = false;
- this.$message.error(res.message);
- }
- })
- .catch((e) => {
- this.subLoading = false;
- this.$message.error(e.message);
- });
- },
- cancelData() {
- //取消提交
- if (this.selectRows.length < 1) {
- this.$message.warning("请至少勾选一条您要取消提交的数据");
- return;
- }
- // if (this.saveRow.stateFlag != 1) {
- // this.$message.warning('数据不是提交状态,不可取消提交!')
- // return
- // }
- let ids = [];
- for (let i = 0; i < this.selectRows.length; i++) {
- let item = this.selectRows[i];
- if (item.stateFlag === "0") {
- return this.$message.warning(
- "委托编号为[" + item.id + "]的数据为编辑状态,无法进行取消提交!"
- );
- }
- if (item.validFlag === "1") {
- ids.push(item.id);
- }
- }
- this.subLoading = true;
- this.axios
- .post("pass/testManagement/v1/limstestentrusts/cancel", ids, {
- individualType: "json",
- })
- .then((res) => {
- if (res.code == 0 || res.code == 200) {
- this.$message.success(res.message);
- this.removeNumber();
- this.mainData();
- this.mainData1();
- this.subLoading = false;
- } else {
- this.$message.error(res.message);
- }
- this.subLoading = false;
- })
- .catch((e) => {
- this.subLoading = false;
- this.$message.error(e.message);
- });
- },
- deleteData2() {
- if (this.selectDataList.length == 0) {
- this.$message.warning("请选中计划检验项目信息数据!");
- return;
- }
- if (this.saveRow.stateFlag == 1) {
- this.$message.warning("数据已提交,不可进行删除");
- return;
- }
- this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- for (let i = 0; i < this.selectDataList.length; i++) {
- this.axios
- .post(
- "pass/testManagement/v1/limstestentrustds/deleteLimsTestEntrustD?id=" +
- this.selectDataList[i].id,
- { individualType: "json" }
- )
- .then((res) => {
- if (res.succeed) {
- this.dialogTableVisible = false;
- this.$message.success("删除成功");
- this.depData(this.entrId);
- } else {
- this.$message.error(res.message);
- }
- })
- .catch((e) => {
- this.$message.error(e.message);
- });
- }
- })
- .catch(() => { });
- },
- searchData() {
- this.page.pageNum = 1;
- this.page.pageSize = 200;
- this.mainData();
- this.mainData1();
- },
- closeDialog() {
- this.dialogTableCount = false;
- this.tableCount = [];
- },
- countList() {
- let startTime = "";
- let endTime = "";
- if (!this.search.times) {
- startTime = "";
- endTime = "";
- } else {
- startTime =
- formatDate(this.search.times[0], "yyyy-MM-dd") + " 00:00:00";
- endTime = formatDate(this.search.times[1], "yyyy-MM-dd") + " 23:59:59";
- }
- let obj = {
- object: {
- entrOrgNo: this.search.planCompanyNo, // 委托单位
- sampleTypeCode: 480103,
- matName: this.search.matName,
- batchNo: this.search.batchNo,
- validFlag: "1",
- stateFlag: "1",
- },
- startTime: startTime,
- endTime: endTime,
- };
- this.axios
- .post(
- "pass/testManagement/v1/limstestentrusts/queryLimsTestEntrustCount",
- obj,
- { individualType: "json" }
- )
- .then((res) => {
- this.tableCount = res.data;
- this.dialogTableCount = true;
- })
- .catch((e) => {
- this.$message.error("查询错误!");
- });
- },
- mainData() {
- (this.saveRow = {}), (this.dataLoading = true);
- let startTime = "";
- let endTime = "";
- if (!this.search.times) {
- startTime = null;
- endTime = null;
- } else {
- startTime =
- formatDate(this.search.times[0], "yyyy-MM-dd") + " 00:00:00";
- endTime = formatDate(this.search.times[1], "yyyy-MM-dd") + " 23:59:59";
- }
- let obj = {
- sampleTypeCode: "480103",
- isBatch: "",
- entrOrgNo: this.search.planCompanyNo, // 委托单位
- matName: this.search.matName,
- batchNo: this.search.batchNo,
- carNo: this.search.carNo,
- validFlag: "1",
- sampleNo: this.search.sampleNo,
- pageIndex: this.page.pageNum,
- pageSize: this.page.pageSize,
- startTime: startTime,
- endTime: endTime,
- };
- this.axios
- .post(
- "pass/testManagement/v1/limstestentrusts/queryLimsTestEntrustPage",
- obj,
- { individualType: "json" }
- )
- .then((res) => {
- this.dataLoading = false;
- this.table.list = res.data.list;
- if (this.table.list.length > 0) {
- this.$refs.dataTable.setCurrentRow(this.table.list[0]);
- this.searchFollow(this.table.list[0]);
- }
- this.table.list.forEach((item) => {
- item.stateFlag1 =
- item.validFlag == "0"
- ? "已停用"
- : item.stateFlag === "0"
- ? "编辑"
- : item.stateFlag === "1"
- ? "提交"
- : "";
- item.entrTime1 = formatDate(item.entrTime, "yyyy-MM-dd");
- });
- this.page.totalPage = res.data.total;
- })
- .catch((e) => {
- this.dataLoading = false;
- });
- },
- mainData1() {
- (this.saveRow = {}), (this.invalidLoading = true);
- let startTime = "";
- let endTime = "";
- if (!this.search.times) {
- startTime = null;
- endTime = null;
- } else {
- startTime = this.search.times[0];
- endTime = this.search.times[1];
- }
- let tempobj = {
- object: {
- sampleTypeCode: "480103",
- isBatch: "",
- entrOrgNo: this.search.planCompanyNo, // 委托单位
- matName: this.search.matName,
- batchNo: this.search.batchNo,
- carNo: this.search.carNo,
- validFlag: "0",
- },
- sampleNo: this.search.sampleNo,
- pageIndex: this.page.pageNum,
- pageSize: this.page.pageSize,
- startTime: startTime,
- endTime: endTime,
- };
- this.axios
- .post(
- "pass/testManagement/v1/limstestentrusts/queryLimsTestEntrustPage",
- tempobj,
- { individualType: "json" }
- )
- .then((res) => {
- this.invalidLoading = false;
- this.table.list1 = res.data.list;
- this.table.list1.forEach((item) => {
- item.stateFlag1 =
- item.validFlag == "0"
- ? "已停用"
- : item.stateFlag === "0"
- ? "编辑"
- : item.stateFlag === "1"
- ? "提交"
- : "";
- item.entrTime1 = formatDate(item.entrTime, "yyyy-MM-dd");
- });
- })
- .catch((e) => {
- this.invalidLoading = false;
- });
- },
- searchFollow(row) {
- this.saveRow = Object.assign({}, row);
- // this.editRow = row
- this.entrId = row.entrId ? row.entrId : "";
- this.depData(this.entrId);
- this.getRevMsg(this.entrId);
- this.getSendMsg(this.entrId);
- },
- selectRow(val) {
- this.selectRows = val;
- },
- selectRow1(val) {
- this.selectRow1s = val;
- },
- getRevMsg(entrId) {
- if (!entrId) {
- return this.$message.warning("获取接收电文参数错误! entrId为空!");
- }
- this.dataLoading3 = true;
- this.axios
- .post(
- "pass/testManagement/v1/limstestentrusts/queryMsgByEntrId",
- { object: { entrId: entrId }, pageIndex: 1, pageSize: 999 },
- { individualType: "json" }
- )
- .then((res) => {
- if (res.code == 0 || res.code == 200) {
- this.dataLoading3 = false;
- this.table.list3 = res.data.list;
- } else {
- this.dataLoading3 = false;
- return this.$message.warning(res.message);
- }
- })
- .catch((e) => {
- this.dataLoading3 = false;
- return this.$message.error(e.message);
- });
- },
- getSendMsg(entrId) {
- if (!entrId) {
- return this.$message.warning("获取发送电文参数错误! entrId为空!");
- }
- this.dataLoading4 = true;
- this.axios
- .post(
- "pass/testManagement/v1/limstestentrusts/queryMsgByEntrIdAndSampleNo",
- { object: { entrId: entrId }, pageIndex: 1, pageSize: 999 },
- { individualType: "json" }
- )
- .then((res) => {
- if (res.code == 0 || res.code == 200) {
- this.dataLoading4 = false;
- this.table.list4 = res.data.list;
- } else {
- this.dataLoading4 = false;
- return this.$message.warning(res.message);
- }
- })
- .catch((e) => {
- this.dataLoading4 = false;
- return this.$message.error(e.message);
- });
- },
- depData(entrId) {
- (this.savaDep = {}), (this.dataLoading2 = true);
- this.axios
- .post(
- "pass/testManagement/v1/limstestentrustds/queryLimsTestEntrustDPage",
- { object: { entrId: entrId }, pageIndex: 1, pageSize: 999 },
- { individualType: "json" }
- )
- .then((res) => {
- this.dataLoading2 = false;
- this.table.list2 = res.data.list;
- this.table.list2.forEach((item) => {
- item.stateFlag1 =
- item.stateFlag === "0"
- ? "编辑"
- : item.stateFlag === "1"
- ? "提交"
- : "";
- item.entrTime1 = formatDate(item.entrTime, "yyyy-MM-dd");
- });
- })
- .catch((e) => {
- this.dataLoading2 = false;
- });
- },
- reset() {
- this.search.times = [this.getYNM(new Date()), this.getYNM(new Date())];
- this.search.planCompanyNo = "";
- this.search.matName = "";
- this.searchData();
- },
- handleSelectionChange(val) {
- this.multipleSelection3 = val;
- },
- pageSizeChange(size) {
- this.page.pageSize = size;
- this.mainData();
- },
- pageCurrentChange(index) {
- this.page.pageNum = index;
- this.mainData();
- },
- async pageSizeChange3(size) {
- this.page3.pageSize = size;
- await this.getQrCodeInfoListAndSetDefault();
- },
- async pageCurrentChange3(index) {
- this.page3.pageNum = index;
- await this.getQrCodeInfoListAndSetDefault();
- },
- handleSelectionChange2(val) {
- this.multipleSelection4 = val;
- },
- addScreen() {
- this.$nextTick(() => {
- let ss = document.createElement("div");
- ss.innerHTML = "筛选";
- ss.style = "text-align: center;";
- this.$refs.dataTable.$el
- .getElementsByClassName("el-table__fixed")[0]
- .getElementsByTagName("td")[0]
- .appendChild(ss);
- });
- },
- addScreen2() {
- this.$nextTick(() => {
- let ss = document.createElement("div");
- ss.innerHTML = "筛选";
- ss.style = "text-align: center;";
- this.$refs.dataTable2.$el
- .getElementsByClassName("el-table__fixed")[0]
- .getElementsByTagName("td")[0]
- .appendChild(ss);
- });
- },
- tableRowClassName({ row, column, rowIndex, columnIndex }) {
- if (columnIndex === 13) {
- if (row.validFlag !== "1") {
- return "error-row";
- }
- }
- if (columnIndex === 2) {
- if (row.validFlag !== "1") {
- return "error-row";
- }
- if (row.stateFlag === "1") {
- return "error-green";
- }
- return "";
- }
- },
- tableRowClassName2({ row, column, rowIndex, columnIndex }) {
- if (columnIndex === 5) {
- if (row.validFlag !== "1") {
- return "error-row";
- }
- return "";
- }
- },
- tableHeaderCellStyle() {
- return "color: rgb(255,255,255);border-bottom: 1px solid #DCDFE7;";
- },
- // 1 显示编辑二维码弹窗
- async showQRCodeInfo() {
- if (this.selectRows.length === 0) {
- this.$message.warning("请勾选您要编辑二维码的数据");
- return;
- }
- if (this.selectRows.length > 1) {
- this.$message.warning("一次只能编辑一个二维码");
- return;
- }
- let flag = this.selectRows.some((u) => u.stateFlag != 1);
- if (flag) {
- return this.$message.warning(
- "未提交数据不允许进行打印,请重新进行勾选"
- );
- }
- this.isShowQrCodeInfo = true;
- let entrIds = [];
- this.selectRows.forEach((p) => {
- entrIds.push(p.entrId);
- });
- // 2 初始化二维码信息
- await this.initQrCode(this.selectRows[0].id);
- // 3 获取二维码信息
- await this.getQrCodeInfoListAndSetDefault();
- },
- // 初始化二维码信息
- async initQrCode(id) {
- await this.axios.get(
- "pass/testManagement/v1/limssampleprints/initData/" + id,
- {
- params: {
- dataType: 1,
- isReset: 0,
- },
- },
- { individualType: "json" }
- );
- },
- // 获取二维码信息
- async getQrCodeInfoList() {
- const res = await this.axios.get(
- "pass/testManagement/v1/limssampleprints/",
- {
- params: {
- pageNum: this.page3.pageNum,
- pageSize: this.page3.pageSize,
- dataSourceId: this.selectRows[0].id,
- isDelete: 0,
- },
- },
- { individualType: "json" }
- );
- if (res.code == 0 || res.code == 200) {
- this.qrCodeInfoData = res.data.list || [];
- this.page3.totalPage = res.data.total;
- } else {
- this.$message.error(res.message);
- }
- return res;
- },
- // 获取二维码信息
- async getQrCodeInfoListById(dataSourceId) {
- const res = await this.axios.get(
- "pass/testManagement/v1/limssampleprints/",
- {
- params: {
- pageNum: 1,
- pageSize: 999,
- dataSourceId,
- },
- },
- { individualType: "json" }
- );
- return res;
- },
- handleQrCodeInfoSelectionChange(val) {
- console.log("handleQrCodeInfoSelectionChange");
- console.log(this.qrCodeInfoData);
- // 初始化勾选期间不进行操作
- if (!this.isSetDefault) {
- this.qrCodeInfoData.forEach((item) => {
- item.isCheck = 0;
- });
- val.forEach((item) => {
- item.isCheck = 1;
- });
- }
- },
- // 打开新增弹窗
- addQrCodeInfo() {
- this.isShowAddQrCodeInfo = true;
- },
- // 设置默认选中
- setDefaultSelected() {
- console.log("setDefaultSelected");
- this.isSetDefault = true;
- this.qrCodeInfoData.forEach((item) => {
- if (item.isCheck === 1) {
- console.log(item);
- this.$refs.qrCodeInfoTable.toggleRowSelection(item, true);
- }
- });
- this.isSetDefault = false;
- },
- // 确认添加
- confirmAddQrCodeInfo() {
- this.qrCodeInfoData.push({
- ...this.addQrCodeInfoForm,
- fieldKey: Date.now(),
- dataSourceId: this.selectRows[0].id,
- isCheck: 0,
- isDelete: 0,
- dataSourceType: 1, // 0 原料 1 成品 2 临时
- });
- this.isShowAddQrCodeInfo = false;
- },
- // 打开编辑窗口
- editQrCodeInfoRow(index, row) {
- this.editQrCodeInfoForm = row;
- console.log("editQrCodeInfoRow");
- console.log(this.editQrCodeInfoForm);
- this.editQrCodeInfoIndex = index;
- this.isShowEditQrCodeInfo = true;
- },
- // 删除二维码字段
- delQrCodeInfoRow(index, row) {
- this.qrCodeInfoData.splice(index, 1);
- if (row.id) {
- this.deleteIds.push(row.id);
- }
- },
- // 确认编辑
- confirmEditQrCodeInfo() {
- this.$set(
- this.qrCodeInfoData,
- this.editQrCodeInfoIndex,
- this.editQrCodeInfoForm
- );
- this.isShowEditQrCodeInfo = false;
- },
- // 重置二维码信息
- resetQrCodeInfo() {
- this.$confirm("确定重置二维码信息吗?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(async () => {
- await this.axios.get(
- "pass/testManagement/v1/limssampleprints/initData/" +
- this.selectRows[0].id,
- {
- params: {
- dataType: 1,
- isReset: 1,
- },
- },
- { individualType: "json" }
- );
- // 获取二维码信息
- const res = await this.getQrCodeInfoListAndSetDefault();
- this.$message.success(res.message);
- });
- },
- // 保存二维码
- async saveQRCode() {
- console.log(this.qrCodeInfoData);
- // 批量删除
- const res = await this.axios.post(
- "pass/testManagement/v1/limssampleprints/batchDelete/",
- this.deleteIds,
- { individualType: "json" }
- );
- if (res.code == 0 || res.code == 200) {
- this.deleteIds = [];
- }
- // 批量更新
- const res2 = await this.axios.post(
- "pass/testManagement/v1/limssampleprints/batchUpdate/",
- this.qrCodeInfoData,
- { individualType: "json" }
- );
- if (res2.code == 0 || res2.code == 200) {
- this.$message.success(res2.message);
- await this.getQrCodeInfoListAndSetDefault();
- // this.isShowQrCodeInfo = false;
- }
- },
- async getQrCodeInfoListAndSetDefault() {
- this.isSetDefault = true;
- await this.getQrCodeInfoList();
- this.$nextTick(async () => {
- // 设置默认选中
- this.setDefaultSelected();
- });
- },
- // 保存并打印二维码
- async saveAndPrintQRCode() {
- await this.saveQRCode();
- this.printQRCode();
- },
- },
- };
- </script>
- <style scoped></style>
|