setReturnTask.vue 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417
  1. <template>
  2. <div>
  3. <el-breadcrumb separator-class="el-icon-arrow-right">
  4. <el-breadcrumb-item :to="{ path: '/jc/workbench' }">首页</el-breadcrumb-item>
  5. <el-breadcrumb-item>承担单位</el-breadcrumb-item>
  6. <el-breadcrumb-item>任务列表</el-breadcrumb-item>
  7. <el-breadcrumb-item>基本信息</el-breadcrumb-item>
  8. </el-breadcrumb>
  9. <!-- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  10. <el-tab-pane label="任务详情" name="taskDetail">
  11. </el-tab-pane>
  12. <el-tab-pane label="抽样" name="sampleDetail">
  13. <sampleDetailcd v-if="activeName == 'sampleDetail'" ref="sampleDetail"></sampleDetailcd>
  14. </el-tab-pane>
  15. <el-tab-pane label="检测" name="testDetail">
  16. </el-tab-pane>
  17. <el-tab-pane label="报告上传" name="reportDetail">
  18. </el-tab-pane>
  19. </el-tabs> -->
  20. <div id="taskDetail">
  21. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  22. <el-tab-pane label="任务详情" name="first">
  23. <el-descriptions class="margin-top" title=" " :column="2" :size="size" border>
  24. <el-descriptions-item>
  25. <template slot="label">
  26. 创建单位
  27. </template>
  28. {{readForm.creater.name}}
  29. </el-descriptions-item>
  30. <el-descriptions-item>
  31. <template slot="label">
  32. 发布单位
  33. </template>
  34. {{readForm.releaser.name}}
  35. </el-descriptions-item>
  36. <el-descriptions-item>
  37. <template slot="label">
  38. 年度
  39. </template>
  40. {{readForm.year}}
  41. </el-descriptions-item>
  42. <el-descriptions-item>
  43. <template slot="label">
  44. 监测类型
  45. </template>
  46. {{readForm.task_class}}
  47. </el-descriptions-item>
  48. <el-descriptions-item>
  49. <template slot="label">
  50. 开始时间
  51. </template>
  52. {{readForm.starttime}}
  53. </el-descriptions-item>
  54. <el-descriptions-item>
  55. <template slot="label">
  56. 结束时间
  57. </template>
  58. {{readForm.endtime}}
  59. </el-descriptions-item>
  60. <el-descriptions-item>
  61. <template slot="label">
  62. 抽检分离
  63. </template>
  64. <span v-if="readForm.is_divide==1">是</span>
  65. <span v-if="readForm.is_divide==0">否</span>
  66. </el-descriptions-item>
  67. <el-descriptions-item>
  68. <template slot="label">
  69. 附件
  70. </template>
  71. <div v-if="readForm.file_url==null">无</div>
  72. <el-link v-else type="primary" :href="readForm.file_url">下载附件</el-link>
  73. </el-descriptions-item>
  74. </el-descriptions>
  75. <el-descriptions class="margin-top" :size="size" border>
  76. <el-descriptions-item>
  77. <template slot="label">
  78. 备注
  79. </template>
  80. {{readForm.log}}
  81. </el-descriptions-item>
  82. </el-descriptions>
  83. </el-tab-pane>
  84. <el-tab-pane label="退回" name="fourth">
  85. <div>
  86. <el-table :data="thTask" border stripe highlight-current-row @current-change="handlecyCurrentChange" style="width: 100%"
  87. :row-style="rowStyle" :cell-style="cellStyle">
  88. <el-table-column :key="table.label" v-for="table in thtableHeader" :label="table.label"
  89. :prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
  90. <el-table-column label="操作" align="center" fixed="right">
  91. <template slot-scope="scope">
  92. <el-button style="margin:5px 0" type="success" size="small" @click="checkUnqualifiedItems(scope.row.task_id,scope.row.id)">查看不合格检测项
  93. </el-button>
  94. </template>
  95. </el-table-column>
  96. </el-table>
  97. <!-- 分页器区域-->
  98. <el-pagination @size-change="handleSizeChangeth" @current-change="handleCurrentChangeth"
  99. :current-page="queryInfoth.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfoth.pageSize"
  100. layout="total, sizes, prev, pager, next, jumper" :total="thTaskTotal" background />
  101. <!-- 不合格检测项目 -->
  102. <el-dialog title="不合格检测项目" :visible.sync="UnqualifiedJcxItemDialog" width="70%" :close-on-click-modal="false"
  103. class="dialogItem">
  104. <el-table :data="thjcxItems" border stripe highlight-current-row style="width: 100%"
  105. :row-style="rowStyle" :cell-style="cellStyle">
  106. <el-table-column type="selection" width="50" align="center"></el-table-column>
  107. <el-table-column label="序号" width="50px" align="center">
  108. <template slot-scope="scope">
  109. {{ scope.$index+1 }}
  110. </template>
  111. </el-table-column>
  112. <el-table-column :key="table.label" v-for="table in thjcxHeader" :label="table.label" :prop="table.prop"
  113. align="center" :width="table.width" :fixed="table.fixed" />
  114. </el-table>
  115. <el-pagination @size-change="handleSizeChangethItems" @current-change="handleCurrentChangethItems"
  116. :current-page="queryInfothItems.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfothItems.pageSize"
  117. layout="total, sizes, prev, pager, next, jumper" :total="thItemsTotal" background />
  118. </el-dialog>
  119. </div>
  120. </el-tab-pane>
  121. <el-tab-pane label="抽样" name="second">
  122. <!-- <el-tab-pane v-if="sampleShow==true" label="抽样" name="second"> -->
  123. <!-- 头部搜索栏 -->
  124. <!-- <el-form style="display: flex; flex-direction: column;" ref="form2" :model="queryInfo">
  125. <el-row style="width: 75%;">
  126. <el-col :span="6">
  127. <el-form-item label="样品名称" class="select" size="small" prop="sample_name">
  128. <el-input v-model="queryInfo.sample_name"></el-input>
  129. </el-form-item>
  130. </el-col>
  131. <el-col :span="6">
  132. <el-form-item label="样品编码" class="select" size="small" prop="sample_id">
  133. <el-input v-model="queryInfo.sample_id"></el-input>
  134. </el-form-item>
  135. </el-col>
  136. <el-col :span="6">
  137. <el-form-item label="受检单位" class="select" size="small" prop="units_name">
  138. <el-input v-model="queryInfo.unit_test_name"></el-input>
  139. </el-form-item>
  140. </el-col>
  141. </el-row>
  142. <el-row style="width: 75%;">
  143. <el-col :span="6">
  144. <el-form-item label="抽样单位" class="select" size="small" prop="sample_unit_name">
  145. <el-input v-model="queryInfo.unit_sample_name"></el-input>
  146. </el-form-item>
  147. </el-col>
  148. <el-col :span="6">
  149. <el-form-item label="抽样日期" class="select" size="small" prop="sample_data">
  150. <el-input v-model="queryInfo.sample_data"></el-input>
  151. </el-form-item>
  152. </el-col>
  153. <el-col :span="6">
  154. <el-form-item label="抽样场所" class="select" size="small" prop="sample_ground">
  155. <el-input v-model="queryInfo.sample_ground"></el-input>
  156. </el-form-item>
  157. </el-col>
  158. <el-col :span="4">
  159. <el-button style="height: 32px;margin-left: 10px;" size="mini" type="success"
  160. @click="searchData()">查询
  161. </el-button>
  162. <el-button style="height: 32px;margin-left: 5px;" size="mini" type="success" @click="resetForm('form2')">
  163. 重置
  164. </el-button>
  165. </el-col>
  166. </el-row>
  167. </el-form> -->
  168. <el-row style="margin-right: 0px;">
  169. <el-table :data="underTask" border stripe highlight-current-row @current-change="handlecyCurrentChange" style="width: 100%"
  170. :row-style="rowStyle" :cell-style="cellStyle">
  171. <el-table-column :key="table.label" v-for="table in tableHeader2" :label="table.label"
  172. :prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
  173. <el-table-column label="操作" align="center" fixed="right">
  174. <template slot-scope="scope">
  175. <el-button style="margin:5px 0" type="success" size="small" plain @click="input(scope.row.id)">填报抽样单
  176. </el-button>
  177. <el-button style="margin-bottom:5px" type="success" size="small" @click="getCydlist(scope.row.id)">查看抽样单列表
  178. </el-button>
  179. <!-- <el-button type="success" size="small" plain @click="sampleDetail(scope.row.sample_id)" @focus="getSampleListDialog = true">查看抽样单列表
  180. </el-button> -->
  181. <!-- <el-button type="primary" size="small" plain icon="el-icon-edit-outline" @click="appear">上报抽样信息
  182. </el-button> -->
  183. </template>
  184. </el-table-column>
  185. </el-table>
  186. <!-- 抽样单列表对话框 -->
  187. <el-dialog title="抽样单列表" :visible.sync="getSampleListDialog" width="75%" :close-on-click-modal="false" class="dialogItem">
  188. <el-form v-if="getSampleListDialog">
  189. <!-- 表格数据区域-->
  190. <el-table ref="multipleTable" :data="tableData" border stripe highlight-current-row
  191. @selection-change="handleSelectionChange" style="width: 100%" :row-style="rowStyle"
  192. :cell-style="cellStyle">
  193. <el-table-column type="selection" width="50"></el-table-column>
  194. <el-table-column label="序号" width="50px">
  195. <template slot-scope="scope">
  196. {{ scope.$index+1 }}
  197. </template>
  198. </el-table-column>
  199. <el-table-column :key="table.label" v-for="table in tableHeader" :label="table.label"
  200. :prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
  201. <!-- <el-table-column label="附件" align="center" width="60">
  202. <template slot-scope="scope">
  203. <span v-if="scope.row.cydProfile.cyd_file_url==''">无</span>
  204. <el-link v-else type="primary" :href="scope.row.cydProfile.cyd_file_url">下载</el-link>
  205. </template>
  206. </el-table-column> -->
  207. <el-table-column label="操作" align="center" fixed="right">
  208. <template slot-scope="scope">
  209. <el-button style="margin:5px 5px" type="success" size="small" plain @click="sampleDetail(scope.row.id)">查看
  210. </el-button>
  211. <el-button style="margin:5px 5px" type="primary" size="small" plain icon="el-icon-edit-outline" v-if="scope.row.cyd_status == 1" @click="putCydStatus(scope.row.id)">上报抽样信息
  212. </el-button>
  213. <el-button style="margin:5px 5px" type="primary" size="small" plain icon="el-icon-edit-outline" v-else>抽样信息已上报
  214. </el-button>
  215. </template>
  216. </el-table-column>
  217. </el-table>
  218. <!-- 分页器区域-->
  219. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  220. :current-page="queryInfo.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo.pageSize"
  221. layout="total, sizes, prev, pager, next, jumper" :total="total" background />
  222. </el-form>
  223. </el-dialog>
  224. </el-row>
  225. </el-tab-pane>
  226. <el-tab-pane label="检测" name="third">
  227. <!-- <el-tab-pane v-if="checkShow==true" label="检测" name="third"> -->
  228. <el-table :data="underTask" border stripe highlight-current-row @current-change="handlecyCurrentChange" style="width: 100%"
  229. :row-style="rowStyle" :cell-style="cellStyle">
  230. <el-table-column :key="table.label" v-for="table in tableHeader2" :label="table.label"
  231. :prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
  232. <el-table-column label="操作" align="center" fixed="right">
  233. <template slot-scope="scope">
  234. <el-button style="margin:5px 0" type="success" size="small" @click="getJcdList(scope.row.id)">查看检测单列表
  235. </el-button>
  236. </template>
  237. </el-table-column>
  238. </el-table>
  239. <!-- 查看检测单列表弹框 -->
  240. <el-dialog title="检测单列表" :visible.sync="checkTestList" width="80%" :close-on-click-modal="false"
  241. class="dialogItem">
  242. <!-- 表格数据区域-->
  243. <el-table :data="tableData1" border stripe highlight-current-row style="width: 100%"
  244. :row-style="rowStyle" :cell-style="cellStyle">
  245. <el-table-column label="序号" width="50px">
  246. <template slot-scope="scope">
  247. {{ scope.$index+1 }}
  248. </template>
  249. </el-table-column>
  250. <el-table-column :key="table.label" v-for="table in checkHeader" :label="table.label"
  251. :prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
  252. <el-table-column label="操作" align="center" fixed="right" width="350px">
  253. <template slot-scope="scope">
  254. <el-button style="margin:5px 5px" type="success" size="mini" v-if="scope.row.jc_value_id==null" plain
  255. @click="getJcdObj(scope.row.id)">填报检测单</el-button>
  256. <el-button style="margin:5px 5px" type="primary" v-else size="mini" plain @click="update(scope.row)">修改</el-button>
  257. <el-button style="margin:5px 5px" type="primary" size="mini" plain @click="upJcdItem(scope.row.sample_id)" v-if="scope.row.cyd_status == 1">上报检测单
  258. </el-button>
  259. <el-button style="margin:5px 5px" type="primary" size="mini" plain @click="upJcdItem(scope.row.sample_id)" v-else>检测单已上报
  260. </el-button>
  261. <!-- <el-button style="margin:5px 5px" type="primary" size="mini" plain @click="creatpdf(scope.row.sample_id)">生成检测报告
  262. </el-button> -->
  263. </template>
  264. </el-table-column>
  265. </el-table>
  266. <!-- 分页器区域-->
  267. <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1"
  268. :current-page="queryInfo1.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo1.pageSize"
  269. layout="total, sizes, prev, pager, next, jumper" :total="jcdListTotal" background />
  270. </el-dialog>
  271. </el-tab-pane>
  272. <el-dialog title="填报检测单" :visible.sync="inputJcdShow" width="70%" :close-on-click-modal="false"
  273. class="dialogItem">
  274. <div id="inputJcd" style="margin:10px 50px; width:100%">
  275. <el-form :rules="rules" :model="jcd">
  276. <el-row>
  277. <el-col :span="10">
  278. <el-form-item label="检测单编码:" prop="jcd_code" class="labelItem">
  279. <el-input v-model="jcd.jcd_code" placeholder="请输入检测单编码" style="width:50%;margin-left:5px;"></el-input>
  280. </el-form-item>
  281. </el-col>
  282. <el-col :span="6">
  283. <el-form-item label="检测结果:" prop="jcd_result" class="labelItem">
  284. <el-radio-group v-model="jcd.jcd_result" @change="jcResult()">
  285. <el-radio :label="1">合格</el-radio>
  286. <el-radio :label="0">不合格</el-radio>
  287. </el-radio-group>
  288. </el-form-item>
  289. </el-col>
  290. </el-row>
  291. <!-- 上传检测报告 -->
  292. <el-form-item label="检测单报告上传:" prop="jcd" class="labelItem">
  293. <el-upload
  294. class="upload-demo"
  295. :headers="myHeaders"
  296. action='http://syjcapi.aielab.net/api/v1/ossUpload'
  297. :on-preview="handlePreview"
  298. :on-remove="handleRemove"
  299. :before-remove="beforeRemove"
  300. :on-success="uploadSuccess"
  301. multiple
  302. :file-list="fileList">
  303. <el-button size="small" type="primary">点击上传</el-button>
  304. <div slot="tip" class="el-upload__tip">只能上传pdf文件,且不超过500kb</div>
  305. </el-upload>
  306. </el-form-item>
  307. </el-form>
  308. </div>
  309. <!-- <div v-show="jcd.jcd_result==0"> -->
  310. <div style="display: flex;flex-direction: row;float: right;margin-bottom: 10px;" v-show="jcd.jcd_result==0">
  311. <el-button type="success" size="small" plain @click="addJcxItemDialog = true">新增不合格项</el-button>
  312. </div>
  313. <!-- 表格数据区域-->
  314. <el-table :data="jcxItems" border stripe highlight-current-row style="width: 100%;"
  315. :row-style="rowStyle" :cell-style="cellStyle" align="center" v-show="jcd.jcd_result==0">
  316. <el-table-column label="序号" width="50px">
  317. <template slot-scope="scope">
  318. {{ scope.$index+1 }}
  319. </template>
  320. </el-table-column>
  321. <el-table-column :key="table.label" v-for="table in jcxHeader" :label="table.label"
  322. :prop="table.prop" align="center" :width="table.width" :fixed="table.fixed">
  323. </el-table-column>
  324. <el-table-column label="操作" align="center">
  325. <template slot-scope="scope">
  326. <el-col style="margin-bottom: 5px;">
  327. <el-button type="success" size="mini" @click="delJcdItem(scope.row.id)">删除</el-button>
  328. </el-col>
  329. </template>
  330. </el-table-column>
  331. </el-table>
  332. <!-- 分页器区域-->
  333. <el-pagination @size-change="handleSizeChange2" @current-change="handleCurrentChange2"
  334. :current-page="queryInfo2.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo2.pageSize"
  335. layout="total, sizes, prev, pager, next, jumper" :total="jcxItemTotal" background v-show="jcd.jcd_result==0" />
  336. <div class="footer">
  337. <el-button type="success" style="margin-bottom:30px;" size="small" @click="putJcd()">完成</el-button>
  338. </div>
  339. </el-dialog>
  340. <el-dialog title="新增不合格检测项目" :visible.sync="addJcxItemDialog" width="40%" :close-on-click-modal="false"
  341. class="dialogItem">
  342. <div id="addUnqualifiedJcx" style="margin:auto;">
  343. <el-form :rules="rules" :model="jcxItem" style="margin:10px auto;">
  344. <el-form-item label="检测项目:" prop="item_name" class="labelItem">
  345. <el-input v-model="jcxItem.item_name" style="width:42%"></el-input>
  346. </el-form-item>
  347. <el-form-item label="标准指标:" prop="item_standard" class="labelItem">
  348. <el-input v-model="jcxItem.item_standard" style="width:42%;"></el-input>
  349. </el-form-item>
  350. <el-form-item label="实测值:" prop="item_measured_value" class="labelItem">
  351. <el-input v-model="jcxItem.item_measured_value" style="width:42%"></el-input>
  352. </el-form-item>
  353. <el-form-item label="单项判定:" prop="item_result" class="labelItem">
  354. <el-input v-model="jcxItem.item_result" style="width:42%"></el-input>
  355. </el-form-item>
  356. <el-form-item label="监测依据:" prop="item_basis" class="labelItem">
  357. <el-input v-model="jcxItem.item_basis" style="width:42%"></el-input>
  358. </el-form-item>
  359. <el-form-item label="备注:" prop="item_log" class="labelItem">
  360. <el-input v-model="jcxItem.item_log" style="width:42%"></el-input>
  361. </el-form-item>
  362. </el-form>
  363. </div>
  364. <div class="footer">
  365. <el-button type="success" style="margin-bottom:30px;" size="small" @click="postJcdItem()">保存</el-button>
  366. </div>
  367. </el-dialog>
  368. <!-- ///////////////////////////////////////////检测报告生成-------难、、、、、、、、、、、、、、、、、、、、、、 -->
  369. <el-dialog title="生成监测报告" :visible.sync="dialogVisible2" width="50%">
  370. <div id="pdf">
  371. <el-form ref="formjc" :model="formjc" label-width="100px"
  372. style="margin-top: 20px;width: 100%;background-color: aliceblue;padding: 5px;">
  373. <el-row style="text-align: center; font-size: 23px; margin: 40px 0;">
  374. 安徽省农业农村厅农产品质量安全例行监测检测报告
  375. </el-row>
  376. <el-row>
  377. <el-col :span="12">
  378. <el-form-item label="样品名称" prop="sample_name" class="labelItem" size="mini">
  379. <el-input disabled v-model="formjc.sample_name"></el-input>
  380. </el-form-item>
  381. </el-col>
  382. <el-col :span="11">
  383. <el-form-item label="样品编码" prop="sample_id" class="labelItem" style="" size="mini">
  384. <el-input disabled v-model="formjc.sample_id"></el-input>
  385. </el-form-item>
  386. </el-col>
  387. </el-row>
  388. <el-row>
  389. <el-col :span="12">
  390. <el-form-item label="型号规格" prop="type" class="labelItem" size="mini">
  391. <el-input disabled v-model="formjc.type"></el-input>
  392. </el-form-item>
  393. </el-col>
  394. <el-col :span="11">
  395. <el-form-item label="执行标准" prop="standard" class="labelItem" style="" size="mini">
  396. <el-input disabled v-model="formjc.standard"></el-input>
  397. </el-form-item>
  398. </el-col>
  399. </el-row>
  400. <el-row>
  401. <el-col :span="12">
  402. <el-form-item label="生产日期或批号" prop="production_date" class="labelItem" size="mini">
  403. <el-input disabled v-model="formjc.production_date"></el-input>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="11">
  407. <el-form-item label="产地" prop="place" class="labelItem" style="" size="mini">
  408. <el-input disabled v-model="formjc.place"></el-input>
  409. </el-form-item>
  410. </el-col>
  411. </el-row>
  412. <el-row>
  413. <el-col :span="12">
  414. <el-form-item label="产品认证情况" prop="certicfie" class="labelItem" size="mini">
  415. <el-input disabled v-model="formjc.certicfie"></el-input>
  416. </el-form-item>
  417. </el-col>
  418. <el-col :span="11">
  419. <el-form-item label="证书编号" prop="certifie_num" class="labelItem" style="" size="mini">
  420. <el-input disabled v-model="formjc.certifie_num"></el-input>
  421. </el-form-item>
  422. </el-col>
  423. </el-row>
  424. <el-row>
  425. <el-col :span="12">
  426. <el-row>
  427. <el-col :span="13">
  428. <el-form-item label="抽样数量" prop="sample_num" class="labelItem" size="mini">
  429. <el-input disabled v-model="formjc.sample_num"></el-input>
  430. </el-form-item>
  431. </el-col>
  432. <el-col :span="10">
  433. <el-form-item label="单位" prop="sample_num_unit" class="labelItem" size="mini"
  434. label-width="60px">
  435. <el-input disabled v-model="formjc.sample_num_unit"></el-input>
  436. </el-form-item>
  437. </el-col>
  438. </el-row>
  439. </el-col>
  440. <el-col :span="11">
  441. <el-row>
  442. <el-col :span="13">
  443. <el-form-item label="抽样基数" prop="sample_base" class="labelItem" size="mini">
  444. <el-input disabled v-model="formjc.sample_base"></el-input>
  445. </el-form-item>
  446. </el-col>
  447. <el-col :span="10">
  448. <el-form-item label="单位" prop="sample_base_unit" class="labelItem" size="mini"
  449. label-width="60px" clearable>
  450. <el-input disabled v-model="formjc.sample_base_unit"></el-input>
  451. </el-form-item>
  452. </el-col>
  453. </el-row>
  454. </el-col>
  455. </el-row>
  456. <el-row>
  457. <el-col>
  458. <el-form-item label="抽样场所" prop="sample_ground" class="labelItem" size="mini">
  459. <el-input disabled v-model="formjc.sample_ground"></el-input>
  460. </el-form-item>
  461. </el-col>
  462. </el-row>
  463. <el-row>
  464. <el-col :span="7" style="text-align: center;vertical-align: middle;line-height: 250px;font-size: 14px;">
  465. <div class="">
  466. 受检单位情况
  467. </div>
  468. </el-col>
  469. <el-col :span="15">
  470. <el-form-item label="单位名称" prop="unitTest.unit_test_name" class="labelItem" style="" size="mini">
  471. <el-input disabled v-model="unitTest.unit_test_name"></el-input>
  472. </el-form-item>
  473. <el-form-item label="通讯地址" prop="unitTest.address" class="labelItem" style="" size="mini">
  474. <el-input disabled v-model="unitTest.address"></el-input>
  475. </el-form-item>
  476. <el-form-item label="法定代表人" prop="unitTest.represent_name" class="labelItem" style="" size="mini">
  477. <el-input disabled v-model="unitTest.represent_name"></el-input>
  478. </el-form-item>
  479. <el-form-item label="受检人" prop="unitTest.user_name" class="labelItem" style="" size="mini">
  480. <el-input disabled v-model="unitTest.user_name"></el-input>
  481. </el-form-item>
  482. <el-form-item label="电话" prop="unitTest.phone" class="labelItem" style="" size="mini">
  483. <el-input disabled v-model="unitTest.phone"></el-input>
  484. </el-form-item>
  485. <el-form-item label="传真" prop="unitTest.fax" class="labelItem" style="" size="mini">
  486. <el-input disabled v-model="unitTest.fax"></el-input>
  487. </el-form-item>
  488. </el-col>
  489. </el-row>
  490. </el-form>
  491. <el-table :data="resultjc" border stripe highlight-current-row style="width: 100%"
  492. :row-style="rowStyle" :cell-style="cellStyle">
  493. <el-table-column :key="table.label" v-for="table in jcheader" :label="table.label"
  494. :prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
  495. </el-table>
  496. </div>
  497. <!-- <div style="margin-top: 10px; text-align: center">
  498. <el-button @click="dialogVisible2 = false">取 消</el-button>
  499. <el-button type="primary" @click="download">生成检测报告pdf</el-button>
  500. </div> -->
  501. <!-- </span> -->
  502. </el-dialog>
  503. <!-- <el-tab-pane label="报告上传" name="five">
  504. <el-upload class="upload-demo" :file-list="fileList" drag :headers="myHeaders"
  505. action="http://syjcapi.aielab.net/api/v1/ossUpload" :on-success="uploadSuccess" :limit="1">
  506. <i class="el-icon-upload"></i>
  507. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  508. </el-upload>
  509. </el-tab-pane> -->
  510. </el-tabs>
  511. </div>
  512. </div>
  513. </template>
  514. <script>
  515. import htmlToPdf from '../../assets/js/htmlToPdf.js'
  516. import inputCheck from './inputCheck'
  517. const token = window.sessionStorage.getItem('token')
  518. const name = window.sessionStorage.getItem('name')
  519. export default {
  520. name: 'setTask',
  521. data() {
  522. return {
  523. size: 'medium',
  524. myHeaders: {
  525. Authorization: token
  526. },
  527. rules: {
  528.                 item_name: [{required: true, message: '该项为必填项', trigger: 'blur'},],
  529. // inspected_address: [{required: true, message: '请输入单位地址', trigger: 'blur'},],
  530. item_standard: [{required: true, message: '该项为必填项', trigger: 'blur'},],
  531. item_measured_value: [{required: true, message: '该项为必填项', trigger: 'blur'},],
  532. item_result: [{required: true, message: '该项为必填项', trigger: 'blur'},],
  533. item_basis: [{required: true, message: '该项为必填项', trigger: 'blur'},],
  534. item_log: [{required: true, message: '该项为必填项', trigger: 'blur'},],
  535. },
  536. radio:{},
  537. formjc: {},
  538. unitTest: {},
  539. dialogVisible2: false,
  540. getSampleListDialog: false,//抽样单列表对话框
  541. checkTestList: false,//检测单列表对话框
  542. addJcxItemDialog: false,//新增不合格检测项目对话框
  543. UnqualifiedJcxItemDialog: false,//退回中查看不合格检测项目对话框
  544. jcxItemTotal: 0,
  545. thItemsTotal: 0,
  546. activeName: 'first',
  547. jcxItems: {},
  548. thjcxItems:{},
  549. id: 0,
  550. jcd: {
  551. jcd_result: '',
  552. file_name: '',
  553. file_url: ''
  554. },
  555. readForm: {
  556. creater: [],
  557. releaser: [],
  558. modelInfo: [],
  559. model_type: '',
  560. },
  561. // sample_name: '',
  562. // sample_id: '',
  563. sampleTask: [],
  564. underTask: [],
  565. jcdListTotal: 0,
  566. queryInfo: {
  567. pageNum: 1,
  568. pageSize: 10,
  569. },
  570. queryInfo1:{
  571. pageNum: 1,
  572. pageSize: 10,
  573. task_id: '',
  574. task_profile_id: ''
  575. },
  576. queryInfo2:{
  577. pageNum: 1,
  578. pageSize: 10,
  579. jcd_id: ''
  580. },
  581. queryInfoth:{
  582. pageNum: 1,
  583. pageSize: 10,
  584. task_id: ''
  585. },
  586. queryInfothItems:{
  587. pageNum: 1,
  588. pageSize: 10,
  589. task_id: '',
  590. task_profile_id: ''
  591. },
  592. cellStyle: {
  593. padding: 2 + 'px'
  594. },
  595. rowStyle: {
  596. height: 35 + 'px'
  597. },
  598. tableHeader: [{
  599. label: '抽样单编码',
  600. prop: 'cyd_code'
  601. // fixed: 'left'
  602. },
  603. {
  604. label: '受检单位',
  605. prop: 'inspectedUnit.inspected_name',
  606. width: 180
  607. },
  608. {
  609. label: '抽样日期',
  610. prop: 'cydProfile.cyd_date',
  611. width: 150
  612. },
  613. {
  614. label: '状态',
  615. prop: 'status',
  616. width: 100
  617. }
  618. ],
  619. //获取检测单列表表格
  620. checkHeader: [{
  621. label: '抽样单编码',
  622. prop: 'cyd_code'
  623. // fixed: 'left'
  624. },
  625. {
  626. label: '受检单位',
  627. prop: 'inspectedUnit.inspected_name',
  628. width: 180
  629. },
  630. {
  631. label: '抽样日期',
  632. prop: 'cydProfile.cyd_date',
  633. width: 150
  634. },
  635. {
  636. label: '状态',
  637. prop: 'status',
  638. width: 100
  639. }
  640. ],
  641. jcxHeader: [
  642. {
  643. label: '检测项目',
  644. prop: 'item_name'
  645. // fixed: 'left'
  646. },
  647. {
  648. label: '标准指标',
  649. prop: 'item_standard',
  650. // width: 180
  651. },
  652. {
  653. label: '实测值',
  654. prop: 'item_measured_value',
  655. // width: 150
  656. },
  657. {
  658. label: '单项判定',
  659. prop: 'item_result',
  660. // width: 100
  661. },
  662. {
  663. label: '检验依据',
  664. prop: 'item_basis',
  665. // width: 100
  666. },
  667. {
  668. label: '备注',
  669. prop: 'item_log',
  670. // width: 100
  671. },
  672. ],
  673. thjcxHeader: [
  674. {
  675. label: '检测项目',
  676. prop: 'item_name'
  677. // fixed: 'left'
  678. },
  679. {
  680. label: '标准指标',
  681. prop: 'item_standard',
  682. // width: 180
  683. },
  684. {
  685. label: '实测值',
  686. prop: 'item_measured_value',
  687. // width: 150
  688. },
  689. {
  690. label: '单项判定',
  691. prop: 'item_result',
  692. // width: 100
  693. },
  694. {
  695. label: '检验依据',
  696. prop: 'item_basis',
  697. // width: 100
  698. },
  699. {
  700. label: '备注',
  701. prop: 'item_log',
  702. // width: 100
  703. },
  704. ],
  705. checkHeader2: [{
  706. label: '检测项目',
  707. prop: 'test_name',
  708. // fixed: 'left'
  709. }],
  710. // 数据表格数据
  711. tableData: [],
  712. tableData1: [],
  713. options: [],
  714. // thTask: {
  715. // sampleOrgId: '',
  716. // checkOrgId: '',
  717. // sample_address: ''
  718. // },
  719. thTask: [],
  720. thTaskTotal: 0,
  721. task_id: '',
  722. multipleSelection: null,
  723. // 填报检测对话框
  724. inputJcdShow: false,
  725. jcd_id: '',
  726. testPesticides: [],
  727. resultjc: [],
  728. jcheader: [{
  729. label: '检测项目',
  730. prop: 'test_name',
  731. },
  732. {
  733. label: '检测值',
  734. prop: 'test_value',
  735. }, {
  736. label: '限量值',
  737. prop: 'state_value',
  738. }, {
  739. label: '单位',
  740. prop: 'unit',
  741. }, {
  742. label: '抽检结果',
  743. prop: 'test_result'
  744. }, {
  745. label: 'LOD',
  746. prop: 'LOD',
  747. }, {
  748. label: 'LOQ',
  749. prop: 'LOQ',
  750. }
  751. ],
  752. tableHeader2: [{
  753. label: '抽样机构',
  754. prop: 'sampleOrgId.name',
  755. // width: 180,
  756. }, {
  757. label: '检测机构',
  758. prop: 'checkOrgId.name'
  759. },
  760. {
  761. label: '抽样地区',
  762. prop: 'sample_address'
  763. },
  764. ],
  765. thtableHeader: [{
  766. label: '抽样机构',
  767. prop: 'sampleOrgId.name',
  768. // width: 180,
  769. }, {
  770. label: '检测机构',
  771. prop: 'checkOrgId.name'
  772. },
  773. {
  774. label: '抽样地区',
  775. prop: 'sample_address'
  776. },
  777. ],
  778. fileList: [],
  779. total: 0,
  780. sampleShow: false, //是否展示抽样卡片
  781. checkShow: false, //是否展示检测卡片
  782. currentRow: null,//选中机构地域表格数据项
  783. jcxItem:{},//新增检测项目
  784. };
  785. },
  786. components: {
  787. inputCheck
  788. },
  789. mounted() {},
  790. created() {
  791. this.task_id = this.$route.params.id
  792. this.getTask()
  793. this.getCheckTaskList()
  794. this.getOldTaskProfile()
  795. },
  796. methods: {
  797. // 获取检测单列表
  798. async getJcdList(id){
  799. this.queryInfo1['task_id'] = this.task_id
  800. this.queryInfo1['task_profile_id'] = id
  801. this.checkTestList = true
  802. this.getJcds()
  803. },
  804. async getJcds() {
  805. const {
  806. data: res
  807. } = await this.$http.post("getJcds", this.queryInfo1);
  808. // console.log(res)
  809. this.tableData1 = res.data.rows
  810. for(let i= 0; i < this.tableData1.length; i++) {
  811. if(this.tableData1[i].cyd_status == 1) {
  812. this.tableData1[i].status = '未上报'
  813. }else {
  814. this.tableData1[i].status = '已上报'
  815. }
  816. }
  817. console.log(this.tableData1[0].cyd_status)
  818. this.jcdListTotal = res.data.total
  819. },
  820. // 获取抽样单列表
  821. async getCydlist(id) {
  822. this.queryInfo['task_id'] = this.task_id
  823. this.queryInfo['task_profile_id'] = id
  824. this.getSampleListDialog = true
  825. this.getCyds()
  826. },
  827. async getCyds() {
  828. const {
  829. data: res
  830. } = await this.$http.post("getCyds", this.queryInfo);
  831. // console.log(res)
  832. this.tableData = res.data.rows
  833. for(let i= 0; i < this.tableData.length; i++) {
  834. if(this.tableData[i].cyd_status == 1) {
  835. this.tableData[i].status = '未上报'
  836. }else {
  837. this.tableData[i].status = '已上报'
  838. }
  839. }
  840. console.log(this.tableData[0].status)
  841. this.total = res.data.total
  842. },
  843. // 删除不合格检测项目信息
  844. async delJcdItem(id) {
  845. let that = this
  846. const result = await this.$http.post('delJcdItem', {jcd_item_id: id})
  847. // 判断业务逻辑
  848. if (result.data.code == 0) {
  849. this.$message({
  850. type: 'success',
  851. message: '删除成功'
  852. })
  853. this.getJcdItems()
  854. }
  855. },
  856. //新增不合格检测项目
  857. async postJcdItem() {
  858. let that = this
  859. that.jcxItem['jcd_id'] = that.jcd_id
  860. const result = await this.$http.post('postJcdItem', that.jcxItem)
  861. if (result.data.code == 0) {
  862. this.$message({
  863. type: 'success',
  864. message: '保存成功'
  865. })
  866. this.addJcxItemDialog = false
  867. this.getJcdItems()
  868. }
  869. },
  870. //获取不合格检测项目列表
  871. async getJcdItems() {
  872. let that = this
  873. that.queryInfo2.jcd_id = that.jcd_id
  874. const res = await this.$http.post('getJcdItems',that.queryInfo2)
  875. console.log(res.data.data.rows)
  876. this.jcxItems = res.data.data.rows
  877. this.jcxItemTotal = res.data.data.total
  878. },
  879. //获取退回任务不合格检测项目列表
  880. // async getthJcdItems() {
  881. // let that = this
  882. // that.queryInfo2.jcd_id = that.jcd_id
  883. // const res = await this.$http.post('getUnqualifiedItem',that.queryInfo2)
  884. // console.log(res.data.data.rows)
  885. // this.thjcxItems = res.data.data.rows
  886. // this.thjcxItemTotal = res.data.data.total
  887. // },
  888. //填报检测单完成
  889. async putJcd() {
  890. let that = this
  891. that.jcd.jcd_id = that.jcd_id
  892. const res = await this.$http.post('putJcd',that.jcd)
  893. if (res.data.code == 0) {
  894. this.$message({
  895. type: 'success',
  896. message: '填报检测单成功'
  897. })
  898. }
  899. this.inputJcdShow = false
  900. },
  901. //查询
  902. async searchData() {
  903. console.log(this.queryInfo)
  904. this.queryInfo.pageNum = 1
  905. this.getCyds()
  906. },
  907. //重置
  908. resetForm(formName) {
  909. // console.log(this.queryInfo)
  910. this.$refs[formName].resetFields();
  911. },
  912. //选中抽样任务(单选)
  913. handlecyCurrentChange(val) {
  914. this.currentRow = val;
  915. console.log(this.currentRow)
  916. console.log(this.currentRow.id)
  917. // under_id =
  918. },
  919. //获取任务详情
  920. async getTask() {
  921. var that = this
  922. const {
  923. data: res
  924. } = await this.$http.post("getTask", {
  925. task_id: that.task_id,
  926. pageNum: that.queryInfo.pageNum,
  927. pageSize: that.queryInfo.pageSize
  928. });
  929. if(res.data.task_class = 'retask'){
  930. res.data.task_class = '退回任务'
  931. }
  932. that.readForm = res.data
  933. console.log(that.readForm)
  934. },
  935. //上传文件
  936. handleRemove(file, fileList) {
  937. console.log(file, fileList);
  938. },
  939. handlePreview(file) {
  940. console.log(file);
  941. },
  942. beforeRemove(file, fileList) {
  943. return this.$confirm(`确定移除 ${ file.name }?`);
  944. },
  945. // 上传成功
  946. uploadSuccess(res) {
  947. console.log(res.data)
  948. this.jcd.file_url = res.data.fileUrl
  949. this.jcd.file_name = res.data.fileName
  950. console.log(this.jcd.file_url)
  951. console.log(this.jcd.file_name)
  952. },
  953. //退回任务列表
  954. async getOldTaskProfile(){
  955. this.queryInfoth['task_id'] = this.task_id
  956. const res = await this.$http.post('getOldTaskProfile',this.queryInfoth)
  957. console.log(res.data.data)
  958. this.thTask = res.data.data.rows
  959. this.thTaskTotal = res.data.data.total
  960. },
  961. //退回中查看不合格检测项目
  962. async checkUnqualifiedItems(task_id,task_profile_id){
  963. var that = this
  964. that.queryInfothItems['task_id'] = task_id
  965. that.queryInfothItems['task_profile_id'] = task_profile_id
  966. const res = await this.$http.post('getUnqualifiedItem',that.queryInfothItems)
  967. this.thjcxItems = res.data.data.rows
  968. this.thItemsTotal = res.data.data.total
  969. this.UnqualifiedJcxItemDialog = true
  970. },
  971. //抽样标签详情
  972. async getSampleTaskList(){
  973. for (var key in this.queryInfo) {
  974. if (this.queryInfo[key] == '') {
  975. delete this.queryInfo[key]
  976. }
  977. }
  978. var that = this
  979. const {
  980. data: res
  981. } = await this.$http.post("getSampleTaskList", {
  982. task_id: that.task_id,
  983. // pageNum: that.queryInfo.pageNum,
  984. // pageSize: that.queryInfo.pageSize
  985. });
  986. console.log(res)
  987. that.sampleTask = res.data.rows
  988. console.log(that.sampleTask)
  989. },
  990. //检测标签详情
  991. async getCheckTaskList(){
  992. var that = this
  993. const {
  994. data: res
  995. } = await this.$http.post("getCheckTaskList", {
  996. task_id: that.task_id,
  997. // pageNum: that.queryInfo.pageNum,
  998. // pageSize: that.queryInfo.pageSize
  999. });
  1000. console.log(res)
  1001. that.underTask = res.data.rows
  1002. console.log(that.underTask)
  1003. },
  1004. // 上传成功
  1005. // async uploadSuccess(res) {
  1006. // console.log(res.data)
  1007. // this.form.file_url = res.data.fileUrl
  1008. // this.form.file_name = res.data.fileName
  1009. // const result = await this.$http.post('saveTestFile', {
  1010. // sample_id: sample_id
  1011. // })
  1012. // if (result.data.code == 0) {
  1013. // that.formjc = result.data.data
  1014. // }
  1015. // },
  1016. //下载检测报告
  1017. // download() {
  1018. // htmlToPdf.downloadPDF(document.querySelector('#pdf'), '检测报告')
  1019. // },
  1020. //生成检测报告pdf
  1021. // async creatpdf(sample_id) {
  1022. // var that = this
  1023. // that.dialogVisible2 = true
  1024. // // async getSampleDetail() {
  1025. // // const result = await this.$http.post('getSampleDetail', {
  1026. // // sample_id: sample_id
  1027. // // })
  1028. // // if (result.data.code == 0) {
  1029. // // that.formjc = result.data.data
  1030. // // }
  1031. // // console.log(that.formjc)
  1032. // const res = await this.$http.post('getTestValue', {
  1033. // sample_id: sample_id
  1034. // })
  1035. // console.log()
  1036. // if (res.data.code == 0) {
  1037. // that.formjc = res.data.data.result
  1038. // that.unitTest = res.data.data.result.unitTest
  1039. // that.resultjc = res.data.data.result_detail
  1040. // }
  1041. // console.log(that.formjc)
  1042. // console.log(that.resultjc)
  1043. // // },
  1044. // },
  1045. //保存检测单
  1046. // async saveJcdItem() {
  1047. // console.log(this.testPesticides)
  1048. // console.log(this.underInfo)
  1049. // for (let i = 0; i < this.testPesticides.length; i++) {
  1050. // this.testPesticides[i]['unit'] = 'mg/kg'
  1051. // console.log(this.testPesticides[i]['state_value'])
  1052. // if (this.testPesticides[i]['state_value'] === 'ND') {
  1053. // if (this.testPesticides[i]['test_value'] !== 'ND') {
  1054. // this.testPesticides[i]['test_result'] = '不合格'
  1055. // }
  1056. // } else {
  1057. // if (this.testPesticides[i]['test_value'] <= this.testPesticides[i]['state_value']) {
  1058. // this.testPesticides[i]['test_result'] = '合格'
  1059. // } else if (this.testPesticides[i]['test_value'] > this.testPesticides[i]['state_value']) {
  1060. // this.testPesticides[i]['test_result'] = '不合格'
  1061. // }
  1062. // }
  1063. // delete this.testPesticides[i]['test_model_id']
  1064. // }
  1065. // var that = this
  1066. // const result = await this.$http.post("saveJcdItem", {
  1067. // pesticides: that.testPesticides,
  1068. // sample_id: that.sample_id
  1069. // });
  1070. // if (result.data.data.disable_upload_data == '') {
  1071. // this.$message({
  1072. // type: 'success',
  1073. // message: '检测成功!'
  1074. // });
  1075. // that.inputCheckShow = false
  1076. // that.getJcdList(this.underInfo.underTake_id)
  1077. // } else if(result.data.data.enable_upload_data == ''){
  1078. // this.$message({
  1079. // type: 'error',
  1080. // message: '请输入检测数据'
  1081. // });
  1082. // } else{
  1083. // this.$message({
  1084. // type: 'error',
  1085. // message: '已存在数据保存失败,新增数据保存成功'
  1086. // });
  1087. // that.inputCheckShow = false
  1088. // that.getJcdList(this.underInfo.underTake_id)
  1089. // }
  1090. // },
  1091. //填报检测单
  1092. async getJcdObj(id) {
  1093. console.log(111)
  1094. this.inputJcdShow = true
  1095. console.log(222)
  1096. var that = this
  1097. const {
  1098. data: res
  1099. } = await this.$http.post("getJcdObj", {
  1100. cyd_id: id,
  1101. });
  1102. that.jcd_id = res.data.jcd_id
  1103. console.log(that.jcd_id)
  1104. },
  1105. //检测单列表-上报
  1106. async upJcdItem(id){
  1107. var that = this
  1108. const result = await this.$http.post('upJcdItem', {
  1109. sample_id: id
  1110. })
  1111. console.log(result.data.data)
  1112. // this.getCyds()
  1113. // 判断业务逻辑
  1114. if (result.data.code == 0) {
  1115. this.$message({
  1116. type: 'success',
  1117. message: '上报抽样信息成功'
  1118. })
  1119. this.getJcdList(result.data.data)
  1120. }
  1121. },
  1122. handleClick(tab, event) {
  1123. console.log(tab, event);
  1124. },
  1125. // 跳转到填写抽样单
  1126. inputSample() {
  1127. this.activeName = 'second'
  1128. },
  1129. // 填报抽样单
  1130. input(id) {
  1131. console.log(id)
  1132. console.log(this.readForm.id)
  1133. this.$router.push({
  1134. name: 'fillSampleReport',
  1135. params: {
  1136. task_id: this.readForm.id,
  1137. under_id:id
  1138. }
  1139. })
  1140. // }
  1141. // if(isset(this.currentRow.id)){
  1142. // this.under_id=this.currentRow.id
  1143. // }
  1144. // console.log(this.currentRow.id)
  1145. },
  1146. // 返回
  1147. back() {
  1148. var that = this
  1149. this.$router.push({
  1150. name: 'setTaskcd',
  1151. params: {
  1152. id: that.id
  1153. }
  1154. })
  1155. },
  1156. // 上传抽样信息
  1157. async putCydStatus(id) {
  1158. let that = this
  1159. // that.orgs = that.multipleSelection
  1160. // console.log(that.multipleSelection)
  1161. const result = await this.$http.post('putCydStatus', {
  1162. cyd_id: id
  1163. })
  1164. console.log(result.data.data)
  1165. // this.getCyds()
  1166. // 判断业务逻辑
  1167. this.$message({
  1168. type: 'success',
  1169. message: '上报抽样信息成功'
  1170. })
  1171. this.getCyds(result.data.data)
  1172. // if (result.data.code == 0) {
  1173. // this.$message({
  1174. // type: 'success',
  1175. // message: '上报抽样信息成功'
  1176. // })
  1177. // this.getCyds(result.data.data)
  1178. // }
  1179. },
  1180. /** 修复当用户在大于1的分页进行数据搜索没有返回值的问题 */
  1181. setPageNum() {
  1182. this.queryInfo.pageNum = 1
  1183. this.getCyds()
  1184. },
  1185. setSelectedRow() {
  1186. // 设置当前页已选项
  1187. this.hander = true
  1188. this.tableData.forEach(item => {
  1189. if (this.list.includes(item[this.uniqueKey])) {
  1190. this.$refs.multipleTable.toggleRowSelection(item, true)
  1191. }
  1192. })
  1193. this.hander = false
  1194. },
  1195. /** 监听每页显示多少数据的改变 */
  1196. handleSizeChange(newSize) {
  1197. this.queryInfo.pageSize = newSize
  1198. this.getCyds()
  1199. },
  1200. /** 监听页码的改变 */
  1201. handleCurrentChange(newPage) {
  1202. this.queryInfo.pageNum = newPage
  1203. this.getCyds()
  1204. },
  1205. /** 监听每页显示多少数据的改变 */
  1206. handleSizeChange1(newSize) {
  1207. this.queryInfo1.pageSize = newSize
  1208. this.getJcdList()
  1209. },
  1210. /** 监听页码的改变 */
  1211. handleCurrentChange1(newPage) {
  1212. this.queryInfo1.pageNum = newPage
  1213. this.getJcdList()
  1214. },
  1215. /** 监听每页显示多少数据的改变 */
  1216. handleSizeChange2(newSize) {
  1217. this.queryInfo2.pageSize = newSize
  1218. this.getJcdItems()
  1219. },
  1220. /** 监听页码的改变 */
  1221. handleCurrentChange2(newPage) {
  1222. this.queryInfo2.pageNum = newPage
  1223. this.getJcdItems()
  1224. },
  1225. /** 监听每页显示多少数据的改变 */
  1226. handleSizeChangeth(newSize) {
  1227. this.queryInfoth.pageSize = newSize
  1228. this.getOldTaskProfile()
  1229. },
  1230. /** 监听页码的改变 */
  1231. handleCurrentChangeth(newPage) {
  1232. this.queryInfoth.pageNum = newPage
  1233. this.getOldTaskProfile()
  1234. },
  1235. handleSizeChangethItems(newSize) {
  1236. this.queryInfothItems.pageSize = newSize
  1237. this.checkUnqualifiedItems()
  1238. },
  1239. /** 监听页码的改变 */
  1240. handleCurrentChangethItems(newPage) {
  1241. this.queryInfothItems.pageNum = newPage
  1242. this.checkUnqualifiedItems()
  1243. },
  1244. // 批量勾选
  1245. handleSelectionChange(val) {
  1246. this.multipleSelection = val
  1247. console.log(this.multipleSelection)
  1248. if (this.hander) return false
  1249. // this.setSelectRows() // 处理选中的方法
  1250. },
  1251. // 跳转到查看抽样单详情
  1252. sampleDetail(id) {
  1253. console.log(id)
  1254. console.log(this.task_id)
  1255. this.$router.push({
  1256. name: 'sampleReport',
  1257. params: {
  1258. task_id: this.task_id,
  1259. id: id
  1260. }
  1261. })
  1262. }
  1263. }
  1264. }
  1265. </script>
  1266. <style lang="less" scoped>
  1267. .el-breadcrumb {
  1268. margin-bottom: 20px;
  1269. }
  1270. // .el-form-item {
  1271. // margin-bottom: 0px;
  1272. // }
  1273. .el-select {
  1274. width: 210px;
  1275. height: 100%;
  1276. }
  1277. .select {
  1278. display: flex;
  1279. flex-direction: row;
  1280. margin-left: 10px;
  1281. }
  1282. // .el-form {
  1283. // margin-left: 35%;
  1284. // }
  1285. // .el-form-item {
  1286. // // margin-bottom: 8px;
  1287. // margin: 0 auto;
  1288. // }
  1289. // .labelItem /deep/ .el-form-item__label {
  1290. // // width: 80px;
  1291. // text-align: center;
  1292. // vertical-align: middle;
  1293. // float: left;
  1294. // font-size: 14px;
  1295. // color: #606266;
  1296. // font-weight: bold;
  1297. // // line-height: 40px;
  1298. // padding: 0 20px 0 0;
  1299. // -webkit-box-sizing: border-box;
  1300. // box-sizing: border-box;
  1301. // }
  1302. .demonstration {
  1303. margin: 20px;
  1304. }
  1305. // .el-form-item__content {
  1306. // width: 200px;
  1307. // }
  1308. .footer {
  1309. margin-top: 20px;
  1310. margin-left: 45%;
  1311. }
  1312. .el-table{
  1313. margin-top: 20px;
  1314. }
  1315. .el-pagination {
  1316. margin-top: 25px;
  1317. }
  1318. /deep/ #taskDetail{
  1319. .el-descriptions-item__label.is-bordered-label{
  1320. width: 18.75rem;}
  1321. }
  1322. /deep/ #addUnqualifiedJcx{
  1323. .el-form-item__label{
  1324. width: 15%;
  1325. }
  1326. .el-form-item__error{
  1327. left: 6.875rem;
  1328. }
  1329. }
  1330. // /deep/ #inputJcd{
  1331. // .el-upload__tip{
  1332. // margin-left: 7.1875rem;
  1333. // }
  1334. // }
  1335. </style>