tab1.vue 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852
  1. <template>
  2. <div class="app-container">
  3. <div class="filter-container">
  4. <el-select v-model="tableObj1.getdataListParm.parammaps.pastureArr"
  5. style="width: 220px;" placeholder="牧场"
  6. multiple
  7. filterable
  8. collapse-tags
  9. class="filter-item" @change="change_pasture1">
  10. <!-- -->
  11. <div class="select_up">
  12. <el-button type="text" @click="selectAll">
  13. <i class="jw jw-quanxuan " />
  14. 全选</el-button>
  15. <el-button type="text" @click="removeTag">
  16. <i class="jw jw-qingkong " />
  17. 清空</el-button>
  18. <el-button type="text" @click="selectReverse">
  19. <i class="jw jw-fanxuan " />
  20. 反选</el-button>
  21. </div>
  22. <div class="select_list">
  23. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
  24. </div>
  25. </el-select>
  26. <el-select v-model="tableObj1.getdataListParm.parammaps.departmentId" clearable style="width: 140px;" placeholder="部门" class="filter-item">
  27. <el-option v-for="item in departNameList1" :key="item.id" :label="item.name" :value="item.id" />
  28. </el-select>
  29. <el-input v-model="tableObj1.getdataListParm.parammaps.outsourcingCode" placeholder="委外维修单号" style="width: 200px;" class="filter-item" />
  30. <el-select v-model="tableObj1.getdataListParm.parammaps.status" style="width: 140px;" clearable placeholder="审核状态" class="filter-item">
  31. <el-option v-for="item in statuesNameList" :key="item.id" :label="item.name" :value="item.id" />
  32. </el-select>
  33. <!-- todo -->
  34. <el-select v-model="tableObj1.getdataListParm.parammaps.reject" style="width: 140px;" clearable placeholder="单据状态" class="filter-item">
  35. <el-option v-for="item in rejectList" :key="item.id" :label="item.name" :value="item.id" />
  36. </el-select>
  37. <el-input v-model="tableObj1.getdataListParm.parammaps.eqName" placeholder="设备名称" style="width: 200px;" class="filter-item" />
  38. <el-input v-model="tableObj1.getdataListParm.parammaps.eqCode" placeholder="设备内部编号" style="width: 200px;" class="filter-item" />
  39. <el-input v-model="tableObj1.getdataListParm.parammaps.contractCode" placeholder="合同编号" style="width: 200px;" class="filter-item" />
  40. <el-date-picker ref="inputDatetime" v-model="tableObj1.getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
  41. <el-button class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
  42. <el-button v-if="istab1Add" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
  43. <!-- isRepairExport
  44. <el-button class="filter-item" type="success" icon="el-icon-download" style="" @click="handleDownload">导出</el-button> -->
  45. </div>
  46. <div class="elTable">
  47. <el-table :max-height="myHeight" :key="tableObj1.tableKey" v-loading="tableObj1.listLoading" element-loading-text="给我一点时间" :data="tableObj1.list" border fit highlight-current-row style="width: 100%;" :row-style="rowStyle" :cell-style="cellStyle" class="elTable table-fixed" >
  48. <el-table-column label="序号" align="center" type="index" width="50px">
  49. <template slot-scope="scope">
  50. <span>{{ scope.$index + (tableObj1.pageNum-1) * tableObj1.pageSize + 1 }}</span>
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="委外单号" min-width="120px" align="center" prop="outsourcingCode" />
  54. <el-table-column label="牧场" min-width="120px" align="center" prop="pastureName" />
  55. <el-table-column label="责任部门 " min-width="120px" align="center" prop="departmentName" />
  56. <el-table-column label="合同" min-width="150px" align="center">
  57. <template slot-scope="scope">
  58. <span v-if="scope.row.contract ==1 ">有</span>
  59. <span v-else>无</span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column label="申请人" min-width="120px" align="center" prop="applicantName" />
  63. <el-table-column label="日期" min-width="120px" align="center" prop="date" />
  64. <el-table-column label="审核状态" min-width="150px" align="center">
  65. <template slot-scope="scope">
  66. <span v-if="scope.row.status == 0 ">审核中</span>
  67. <span v-else-if="scope.row.status == 1 ">审核通过</span>
  68. <span v-else>审核未通过</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="单据状态" min-width="150px" align="center">
  72. <template slot-scope="scope">
  73. <span v-if="scope.row.reject == 0 ">正常</span>
  74. <span v-if="scope.row.reject == 1 ">已关单</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column label="操作" align="center" width="260" class-name="small-padding fixed-width" fixed="right">
  78. <template slot-scope="{row}">
  79. <el-button type="primary" size="mini" @click="form_see(row)">查看</el-button>
  80. <el-button v-if="istab1Edit && (row.status !== 0) && (row.status !== 1) && row.isPasturd " type="success" size="mini" @click="form_edit(row)">编辑</el-button>
  81. <el-button v-if="istab1Del && (row.status !== 1) && row.isPasturd " type="danger" size="mini" @click="form_delete(row)">删除</el-button>
  82. <el-button v-if="row.status !== 0 && row.status !== 1 && row.isPasturd" style="display:inline-block" type="success" size="mini" @click="form_submit(row)">提交</el-button>
  83. <!-- <el-button v-if="row.isAcceptance == 0" style="display:inline-block" type="warning" size="mini" @click="form_closeSubmit(row)">关单</el-button> -->
  84. <el-button v-if="istab1Shenhe1 && (row.status== 0) && (row.flowCompeleted == 1) && row.isPasturd " style="display:inline-block" type="success" size="mini" @click="form_examine(row)">审核1</el-button>
  85. <el-button v-else style="display:none" type="success" size="mini" @click="form_examine(row)">审核1</el-button>
  86. <el-button v-if="istab1Shenhe2 && (row.status== 0) && (row.flowCompeleted == 2 ) && row.isPasturd" style="display:inline-block" type="success" size="mini" @click="form_examine2(row)">审核2</el-button>
  87. <el-button v-else style="display:none" type="success" size="mini" @click="form_examine2(row)">审核2</el-button>
  88. <el-button v-if="istab1Shenhe3 && (row.status== 0) && (row.flowCompeleted == 4) && row.isPasturd" style="display:inline-block" type="success" size="mini" @click="form_examine3(row)">审核3</el-button>
  89. <el-button v-else style="display:none" type="success" size="mini" @click="form_examine3(row)">审核3</el-button>
  90. <el-button v-if="istab1Shenhe4 && (row.status== 0) && (row.flowCompeleted == 6) && (row.isAudit == 1) && row.isPasturd" style="display:inline-block" type="success" size="mini" @click="form_examine4(row)">审核4</el-button>
  91. <el-button v-else style="display:none" type="success" size="mini" @click="form_examine4(row)">审核4</el-button>
  92. </template>
  93. </el-table-column>
  94. </el-table>
  95. <pagination v-show="tableObj1.total>0" :total="tableObj1.total" :page.sync="tableObj1.getdataListParm.offset" :limit.sync="tableObj1.getdataListParm.pagecount" @pagination="get_table_data1()" />
  96. </div>
  97. <!-- 弹出层新增or修改 -->
  98. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="90%">
  99. <div >
  100. <el-form ref="createTemp" :rules="rules" :model="createTemp" label-position="right" label-width="100px" style="width: 100%;">
  101. <el-row :gutter="20">
  102. <el-col :span="8">
  103. <el-form-item label="委外维修单号:" prop="outsourcingCode">
  104. <el-input ref="outsourcingCode" v-model="createTemp.outsourcingCode" disabled />
  105. </el-form-item>
  106. </el-col>
  107. <el-col :span="8">
  108. <el-form-item label="牧场:" prop="pastureId" >
  109. <el-select v-model="createTemp.pastureId" placeholder="牧场" class="filter-item" style="width:100%" :disabled=" dialogStatus==='see'" @change="change_pasture2" >
  110. <el-option v-for="item in pastureNameList" :key="item.id" :label="item.name" :value="item.id" />
  111. </el-select>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="8">
  115. <el-form-item label="责任部门:" prop="departmentId">
  116. <el-select v-model="createTemp.departmentId" placeholder="责任部门" class="filter-item" style="width:100%" :disabled=" dialogStatus==='see'" @change="change_depart2">
  117. <el-option v-for="item in departNameList2" :key="item.id" :label="item.name" :value="item.id" />
  118. </el-select>
  119. </el-form-item>
  120. </el-col>
  121. </el-row>
  122. <el-row :gutter="20">
  123. <el-col :span="8">
  124. <el-form-item label="合同:" prop="contract">
  125. <el-radio-group v-model="createTemp.contract" :disabled="dialogStatus==='see'" @change="change_contract" >
  126. <el-radio :label="0" :checked="createTemp.contract == 0">无合同</el-radio>
  127. <el-radio :label="1" :checked="createTemp.contract == 1">有合同</el-radio>
  128. </el-radio-group>
  129. </el-form-item>
  130. </el-col>
  131. <el-col :span="8">
  132. <el-form-item label="申请人:" prop="applicant">
  133. <el-select v-model="createTemp.applicant" placeholder="申请人" class="filter-item" style="width:100%" :disabled="dialogStatus==='see'" >
  134. <el-option v-for="item in employeNameList" :key="item.id" :label="item.name" :value="item.id" />
  135. </el-select>
  136. </el-form-item>
  137. </el-col>
  138. <el-col :span="8">
  139. <el-form-item label="日期:" prop="date">
  140. <el-date-picker v-model="createTemp.date" :picker-options="pickerOptions" type="date" placeholder="日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" :disabled="dialogStatus==='see'" />
  141. </el-form-item>
  142. </el-col>
  143. </el-row>
  144. <el-row :gutter="20">
  145. <el-col :span="16">
  146. <el-form-item label="故障描述:" prop="description">
  147. <el-input v-model="createTemp.description" type="textarea" autosize :disabled="dialogStatus==='see'" />
  148. </el-form-item>
  149. </el-col>
  150. <el-col :span="8">
  151. <el-form-item label="报修单号:" prop="RUCode">
  152. <el-input ref="RUCode" v-model="createTemp.RUCode" disabled />
  153. </el-form-item>
  154. </el-col>
  155. </el-row>
  156. </el-form>
  157. <el-table
  158. :key="tableKey"
  159. v-loading="listLoading"
  160. element-loading-text="给我一点时间"
  161. :data="listAddCont"
  162. border
  163. fit
  164. highlight-current-row
  165. style="width: 100%;margin-bottom:30px"
  166. :row-style="rowStyle"
  167. :cell-style="cellStyle"
  168. class="elTable"
  169. >
  170. <!-- table表格 -->
  171. <el-table-column :key="1" label="序号" align="center" type="index" width="50px" />
  172. <el-table-column :key="2" label="供应商" prop="providerName" align="center" min-width="80px">
  173. <template slot-scope="scope">
  174. <el-select v-model="scope.row.providerName" filterable placeholder="供应商" class="filter-item" style="width: 120px; margin-top:10px" v-if="dialogStatus ==='create'||dialogStatus ==='update'" >
  175. <el-option v-for="item in providerNameList" :key="item.name" :label="item.name" :value="item.name" />
  176. </el-select>
  177. <span v-if="dialogStatus ==='see'">{{ scope.row.providerName }}</span>
  178. </template>
  179. </el-table-column>
  180. <el-table-column :key="3" v-if="createTemp.contract==0" label="金额" prop="amount" align="center" min-width="80px">
  181. <template slot-scope="scope">
  182. <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
  183. <el-input v-model="scope.row.amount" style="margin-top:10px" />
  184. </span>
  185. <span v-if="dialogStatus ==='see'">{{ scope.row.amount }}</span>
  186. </template>
  187. </el-table-column>
  188. <el-table-column :key="4" label="设备名称" prop="eqName" align="center" min-width="250">
  189. <template slot-scope="scope">
  190. <el-autocomplete style="margin-top:10px" :disabled="dialogStatus ==='see'"
  191. v-model="scope.row.eqName"
  192. class="inline-input"
  193. :fetch-suggestions="querySearchEqNameCont"
  194. value-key="eqName"
  195. placeholder="设备名称"
  196. @select="(value)=>
  197. {handleSelectEqNameCont(value, scope.row)}"
  198. @blur="(value)=>
  199. {blurSelectEqNameCont(value, scope.row)}"
  200. >
  201. <template slot-scope="{ item }">
  202. <span class="addr">{{ item.eqName }}</span>
  203. |<span class="addr">{{ item.eqCode }}</span>
  204. </template>
  205. </el-autocomplete>
  206. </template>
  207. </el-table-column>
  208. <el-table-column :key="5" label="设备内部编号" prop="eqCode" align="center" min-width="150">
  209. <template slot-scope="scope">
  210. <el-autocomplete style="margin-top:10px"
  211. v-model="scope.row.eqCode" :disabled="dialogStatus ==='see'"
  212. class="inline-input"
  213. :fetch-suggestions="querySearchCodeCont"
  214. value-key="eqCode"
  215. placeholder="设备内部编号"
  216. @select="(value)=>
  217. {handleSelectEqCodeCont(value, scope.row)}"
  218. @blur="(value)=>
  219. {blurSelectEqCodeCont(value, scope.row)}"
  220. />
  221. </template>
  222. </el-table-column>
  223. <!-- <el-table-column label="设备名称" prop="eqName" min-width="80px" align="center">
  224. <template slot-scope="scope">
  225. <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
  226. <el-input v-model="scope.row.eqName" style="margin-top:10px" />
  227. </span>
  228. <span v-if="dialogStatus ==='see'">{{ scope.row.eqName }}</span>
  229. </template>
  230. </el-table-column>
  231. <el-table-column label="设备内部编号" prop="eqCode" align="center" min-width="80px">
  232. <template slot-scope="scope">
  233. <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
  234. <el-input v-model="scope.row.eqCode" style="margin-top:10px" />
  235. </span>
  236. <span v-if="dialogStatus ==='see'">{{ scope.row.eqCode }}</span>
  237. </template>
  238. </el-table-column> -->
  239. <el-table-column :key="6" label="费用类型" prop="typea" align="center" min-width="80px">
  240. <template slot-scope="scope">
  241. <el-select v-model="scope.row.typea" placeholder="费用类型" class="filter-item" style="width: 120px; margin-top:10px " v-if="dialogStatus ==='create'||dialogStatus ==='update'">
  242. <el-option v-for="item in costTypeList" :key="item.id" :label="item.name" :value="item.name" />
  243. </el-select>
  244. <span v-if="dialogStatus ==='see'">{{ scope.row.typea }}</span>
  245. </template>
  246. </el-table-column>
  247. <!-- <el-table-column label="交付日期" prop="date" align="center" min-width="80px">
  248. <template slot-scope="scope">
  249. <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
  250. <el-date-picker v-model="scope.row.date" style="margin-top:10px" type="date" placeholder="日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
  251. </span>
  252. <span v-if="dialogStatus ==='see'">{{ scope.row.date }}</span>
  253. </template>
  254. </el-table-column> -->
  255. <el-table-column :key="7" v-if="createTemp.contract == 1" label="合同编号" prop="contractCode" align="center" min-width="80px">
  256. <template slot-scope="scope">
  257. <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
  258. <el-input v-model="scope.row.contractCode" style="margin-top:10px" />
  259. </span>
  260. <span v-if="dialogStatus ==='see'">{{ scope.row.contractCode }}</span>
  261. </template>
  262. </el-table-column>
  263. <el-table-column :key="9" label="铅封号" prop="sealNumber" align="center" min-width="80px">
  264. <template slot-scope="scope">
  265. <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
  266. <el-input v-model="scope.row.sealNumber" style="margin-top:10px" />
  267. </span>
  268. <span v-if="dialogStatus ==='see'">{{ scope.row.sealNumber }}</span>
  269. </template>
  270. </el-table-column>
  271. <el-table-column :key="10" label="历史铅封号" prop="sealNumberHis" align="center" min-width="80px">
  272. <template slot-scope="scope">
  273. <span>{{ scope.row.sealNumberHis }}</span>
  274. </template>
  275. </el-table-column>
  276. <el-table-column :key="8" label="备注" prop="remark" align="center" min-width="180px">
  277. <template slot-scope="scope">
  278. <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
  279. <el-input v-model="scope.row.remark" style="margin-top:10px" />
  280. </span>
  281. <span v-if="dialogStatus ==='see'">{{ scope.row.remark }}</span>
  282. </template>
  283. </el-table-column>
  284. </el-table>
  285. <el-row :gutter="10" v-if="dialogStatus ==='see' ">
  286. <el-col>
  287. <h3>流程进度</h3>
  288. <el-steps :active="active" align-center finish-status="success">
  289. <el-step
  290. v-for="(item,index) in activeList"
  291. :key="index"
  292. :title="item.title"
  293. :status="item.status"
  294. >
  295. <template slot="description">
  296. <div class="step-row">
  297. <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
  298. <div>{{ item.reason }}</div>
  299. </div>
  300. </template>
  301. </el-step>
  302. </el-steps>
  303. </el-col>
  304. </el-row>
  305. <div slot="footer" class="dialog-footer" style="bottom:10px">
  306. <el-button type="primary" :disabled="isokDisable" v-if="dialogStatus !=='see'" @click="dialogStatus==='create'?add_dialog_save():edit_dialog_save()">保存并关闭</el-button>
  307. <el-button @click="dialogFormVisible = false;get_table_data1()">取消并关闭</el-button>
  308. </div>
  309. </div>
  310. </el-dialog>
  311. <!-- 审核 -->
  312. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_Examine" :close-on-click-modal="false" width="30%">
  313. <div class="app-examine">
  314. <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请确认审核结果:</h3>
  315. <el-form ref="examineTemp" :model="examineTemp" label-position="right" style="width: 50%;margin:0 auto;">
  316. <el-row style="width:88%;height:150px;margin:0 auto;">
  317. <el-col :span="20">
  318. <el-form-item>
  319. <el-radio-group v-model="examineTemp.status" @change="change_statue">
  320. <el-radio :label="1" checked>通过</el-radio>
  321. <el-radio :label="2">不通过</el-radio>
  322. </el-radio-group>
  323. </el-form-item>
  324. </el-col>
  325. <el-col v-if="statueReason" :span="20">
  326. <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入不通过原因" />
  327. </el-col>
  328. </el-row>
  329. </el-form>
  330. </div>
  331. <div slot="footer" class="dialog-footer">
  332. <el-button v-if="istab1Shenhe1 && (examineTemp.flowCompeleted == 1) " type="primary" :disabled="isokDisable" @click="form_examine_save()">确认1</el-button>
  333. <el-button v-if="istab1Shenhe2 && (examineTemp.flowCompeleted == 2)" type="primary" :disabled="isokDisable" @click="form_examine_save2()">确认2</el-button>
  334. <el-button v-if="istab1Shenhe3 && (examineTemp.flowCompeleted == 4)" type="primary" :disabled="isokDisable" @click="form_examine_save3()">确认3</el-button>
  335. <el-button v-if="istab1Shenhe4 && (examineTemp.flowCompeleted == 6)" type="primary" :disabled="isokDisable" @click="form_examine_save4()">确认4</el-button>
  336. <!-- <el-button v-if="dialogStatus==='examine22'" type="primary" :disabled="isokDisable" @click="form_examine_save22()">确认</el-button>
  337. <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="form_examine_save2()">确认</el-button>
  338. <el-button v-if="dialogStatus==='examine33'" type="primary" :disabled="isokDisable" @click="form_examine_save33()">确认</el-button>
  339. <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="form_examine_save3()">确认</el-button> -->
  340. <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
  341. </div>
  342. </el-dialog>
  343. </div>
  344. </template>
  345. <script>
  346. import echarts from 'echarts'
  347. require('echarts/theme/macarons')
  348. import { GetDataByNames, GetReportform, GetDataByName,GetAccount, PostDataByName, checkButtons, ExecDataByConfig} from '@/api/common'
  349. import Cookies from 'js-cookie'
  350. import { parseTime, json2excel ,sortChange} from '@/utils/index.js'
  351. import { MessageBox } from 'element-ui'
  352. import Pagination from '@/components/Pagination'
  353. export default {
  354. name: 'Tab1',
  355. components: { Pagination },
  356. inject: ['reload'],
  357. data() {
  358. return {
  359. // todo
  360. isRepairExport: [],
  361. isPercentage: false,
  362. percentage: 0,
  363. findAllPasture:[],
  364. rejectList: [{ id: '0', name: '正常' }, { id: '1', name: '已关单' }], // TODO: 已关单状态
  365. myHeight:document.documentElement.clientHeight - 85- 200,
  366. //多个下拉框 - 请求内容
  367. send_select_list: [
  368. { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
  369. { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
  370. { name: 'findAllProviderByCt', offset: 0, pagecount: 0, parammaps: { 'id': Cookies.get('pastureid') }},
  371. { name: 'findAllMainPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
  372. ],
  373. // 下拉框 - 牧场
  374. pastureNameList: [
  375. // {id: "犊牛1", name: "犊牛1"},
  376. // {id: "犊牛2", name: "犊牛2"},
  377. // {id: "犊牛3", name: "犊牛3"}
  378. ],
  379. getDepartParam1: {
  380. name: 'findAllDepart', offset: 0, pagecount: 0,
  381. parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
  382. },
  383. employeNameList: [],
  384. departNameList1: [],
  385. getDepartParam2: {
  386. name: 'findAllDepart', offset: 0, pagecount: 0,
  387. parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
  388. },
  389. departNameList2: [],
  390. statuesNameList: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
  391. isokDisable: false,
  392. tableObj1: {
  393. getdataListParm: {
  394. name: 'getBigoutsourcingList',
  395. //请求的 page 无用参数 offset 第几页 pagecount 每页多少条
  396. page: 1, offset: 1,pagecount: 50,returntype: 'Map',
  397. parammaps: { pastureName: Cookies.get('pasturename'), outsourcingCode: '',departmentName: '',status: "",eqName: "",eqCode: "",contractCode: "",inputDatetime:"",startdate: "",enddate: "",pastureArr:[]}
  398. },
  399. tableKey: 0,listLoading: false,
  400. //返回的 pageNum 第几页 pageSize 每页多少条 total 总条数
  401. pageNum:'',pageSize:'',total: 0,
  402. list: [
  403. ]
  404. },
  405. requestEqName2: {
  406. name: 'getOutsourceEqbyNameCode',
  407. page: 1,
  408. offset: 1,
  409. pagecount: '',
  410. returntype: 'Map',
  411. parammaps: {
  412. pastureId: Cookies.get('pastureid')
  413. }
  414. },
  415. getAddContListParam: {
  416. name: "getOutsourcingList",
  417. page: 1,offset: 1,pagecount: 20,returntype: "Map",
  418. parammaps: {"bigId": ""}
  419. },
  420. pickerOptions: {
  421. disabledDate(time) {
  422. return time.getTime() > Date.now()// 当天之前的时间可选
  423. }
  424. },
  425. rules: {
  426. outsourcingCode: [{ required: true, message: '必填', trigger: 'blur' }],
  427. equipmentName: [{ required: true, message: '必填', trigger: 'blur' }],
  428. departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
  429. contract: [{ required: true, message: '必填', trigger: 'blur' }],
  430. description: [{ required: true, message: '必填', trigger: 'blur' }],
  431. // equipmentName: [{ required: true, message: '必填', trigger: 'blur' }]
  432. },
  433. tableKey: 0,
  434. listLoading: true,
  435. total: 0,
  436. list: [],
  437. dialogStatus: '',
  438. dialogFormVisible: false,
  439. dialogFormVisibleSee: false,
  440. listLoadingSee: true,
  441. listSee: [],
  442. totalSee: 0,
  443. seeTemp: {},
  444. getdataListSee: {
  445. name: 'getpartpurchaseBybig',
  446. returntype: 'Map',
  447. parammaps: {}
  448. },
  449. createTemp: {
  450. pastureId: this.$store.state.user.pastureid,
  451. departmentId: this.$store.state.user.departmentid,
  452. employeId: this.$store.state.user.employeid,
  453. date: parseTime(new Date(), '{y}-{m}-{d}'),
  454. outsourcingCode: '',
  455. applicant: '',
  456. RUCode: '',
  457. providerId: '',
  458. departmentName: '',
  459. description: '',
  460. contract:1,
  461. },
  462. costTypeList:[
  463. {id:'保养',name:'保养'},
  464. {id:'维修',name:'维修'},
  465. {id:'物耗',name:'物耗'},
  466. {id:'土建',name:'土建'},
  467. {id:'安全',name:'安全'},
  468. ],
  469. providerNameList:[
  470. ],
  471. getParmCreateNumber: {
  472. name: 'autoCreatCode',
  473. page: 0,
  474. offset: 0,
  475. pagecount: 0,
  476. returntype: 'Map',
  477. parammaps: {
  478. pastureId: Cookies.get('pastureid'),
  479. codeType: 'WW'
  480. }
  481. },
  482. listAddCont:[
  483. {providerName:"",providerId: "0",eqId: "0",contractId: "0",sealNumber:"",sealNumberHis:""}
  484. ],
  485. activeList: [],
  486. active: 1,
  487. EqNameList: [],
  488. requestEqName: {
  489. name: 'geteqbyNameCode', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
  490. parammaps: { pastureId: Cookies.get('pastureid') }
  491. },
  492. EqCodeList: [],
  493. dialogFormVisible_Examine: false,
  494. examineTemp: {
  495. "status": 1,
  496. "empid": "",
  497. "flowCompeleted":"",
  498. "workflowNote": "",
  499. "id": ""
  500. },
  501. statueReason: false,
  502. rowStyle: { maxHeight: 50 + 'px', height: 35 + 'px' },
  503. cellStyle: { padding: 0 + 'px' },
  504. textMap: {
  505. update: '编辑',
  506. create: '新增',
  507. see: '查看',
  508. examine: '审核1',
  509. examine22: '审核2',
  510. examine2: '审核3',
  511. examine33: '审核4',
  512. examine3: '审核5',
  513. check1: "部门负责人审核",
  514. check2: "财务负责人审核",
  515. check3: "场长审核"
  516. },
  517. istab1Add:[],
  518. istab1Edit:[],
  519. istab1Del:[],
  520. istab1Shenhe1:[],
  521. istab1Shenhe2:[],
  522. istab1Shenhe4:[],
  523. getParmCreateNumber2: {
  524. name: 'autoCreatCode',
  525. page: 0, offset: 0, pagecount: 0, returntype: 'Map',
  526. parammaps: {
  527. pastureId: Cookies.get('pastureid'),
  528. codeType: 'WY'
  529. }
  530. },
  531. }
  532. },
  533. created() {
  534. this.get_select_list()
  535. this.get_auto_buttons()
  536. },
  537. methods: {
  538. // 导出
  539. handleDownload() {
  540. this.$alert('正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
  541. this.isPercentage = true
  542. this.percentage = 1
  543. var timer = setInterval(() => {
  544. this.percentage += 5
  545. if (this.percentage > 95) {
  546. this.percentage = 99
  547. clearInterval(timer)
  548. }
  549. this.percentage = this.percentage
  550. }, 1000)
  551. this.downLoadParm = {}
  552. this.downLoadParm.name = 'loadRepirsList'
  553. this.downLoadParm.offset = 0
  554. this.downLoadParm.page = 1
  555. this.downLoadParm.returntype = 'Map'
  556. if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
  557. this.tableObj1.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
  558. this.tableObj1.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
  559. } else {
  560. this.tableObj1.getdataListParm.parammaps.startTime = ''
  561. this.tableObj1.getdataListParm.parammaps.stopTime = ''
  562. }
  563. this.downLoadParm.parammaps =this.tableObj1.getdataListParm.parammaps
  564. GetAccount(this.downLoadParm).then(response => {
  565. console.log('导出', response)
  566. })
  567. },
  568. // 删除
  569. removeTag() {
  570. this.tableObj1.getdataListParm.parammaps.pastureArr = []
  571. },
  572. // 全选
  573. selectAll(val) {
  574. val = []
  575. this.findAllPasture.map(item => {
  576. val.push(item.name)
  577. })
  578. this.tableObj1.getdataListParm.parammaps.pastureArr = val
  579. },
  580. // 反选
  581. selectReverse(val) {
  582. val = []
  583. this.findAllPasture.map(item => {
  584. let index = this.tableObj1.getdataListParm.parammaps.pastureArr.indexOf(item.name);
  585. if (index != -1) {
  586. //orgData.splice(index, 1)
  587. } else {
  588. val.push(item.name)
  589. }
  590. })
  591. this.tableObj1.getdataListParm.parammaps.pastureArr = val
  592. },
  593. // 提交按钮
  594. form_submit(row) {
  595. MessageBox.confirm('确认提交此条信息?', {
  596. confirmButtonText: '确认',
  597. cancelButtonText: '取消',
  598. type: 'warning'
  599. }).then(() => {
  600. var send_data2 = {
  601. "common": { "returnmap": "0" },
  602. "data": [
  603. {
  604. "name": "editBigoutsourcingSubmit", "type": "e",
  605. "parammaps": { "id":row.id }
  606. }
  607. ]
  608. }
  609. this.save_submit(send_data2)
  610. }).catch(() => {
  611. this.$message({
  612. type: 'info',
  613. message: '已取消提交'
  614. })
  615. })
  616. },
  617. save_submit(send_data) {
  618. ExecDataByConfig(send_data).then(response => {
  619. if (response.msg !== 'fail') {
  620. this.$notify({ title: '成功', message: '提交成功', type: 'success', duration: 2000 })
  621. this.get_table_data1()
  622. }
  623. })
  624. },
  625. //获取按钮权限
  626. get_auto_buttons() {
  627. const istab1Add = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:add')
  628. this.istab1Add = istab1Add
  629. const istab1Edit = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:edit')
  630. this.istab1Edit = istab1Edit
  631. const istab1Del = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:del')
  632. this.istab1Del = istab1Del
  633. const istab1Shenhe1 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe1')
  634. this.istab1Shenhe1 = istab1Shenhe1
  635. const istab1Shenhe2 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe2')
  636. this.istab1Shenhe2 = istab1Shenhe2
  637. const istab1Shenhe3 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe3')
  638. this.istab1Shenhe3 = istab1Shenhe3
  639. const istab1Shenhe4 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe4')
  640. this.istab1Shenhe4 = istab1Shenhe4
  641. // 导出
  642. const RejectExport = 'maintenance:subcontractingMainten::rejectExport'
  643. const isRepairExport = checkButtons(this.$store.state.user.buttons, RejectExport)
  644. this.isRepairExport = isRepairExport
  645. },
  646. querySearchEqNameCont(queryString, cb) {
  647. console.log('备件名称/设备内部编号模糊查询输入值', queryString)
  648. this.requestEqName2.parammaps['eqName'] = queryString
  649. GetDataByName(this.requestEqName2).then(response => {
  650. console.log('备件名称模糊查询搜索data', response.data.list)
  651. this.EqNameList = response.data.list
  652. cb(this.EqNameList)
  653. })
  654. },
  655. handleSelectEqNameCont(item, row) {
  656. console.log('备件名称/设备内部编号模糊查询选中值', item.eqName)
  657. console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
  658. this.$set(row, 'eqCode', item.eqCode)
  659. this.$set(row, 'sealNumberHis', item.sealNumberHis)
  660. this.$forceUpdate()
  661. },
  662. querySearchCodeCont(queryString, cb) {
  663. console.log('备件名称/设备内部编号模糊查询输入值', queryString)
  664. this.requestEqName2.parammaps['eqCode'] = queryString
  665. GetDataByName(this.requestEqName2).then(response => {
  666. console.log('备件名称模糊查询搜索data', response.data.list)
  667. this.EqNameList = response.data.list
  668. cb(this.EqNameList)
  669. })
  670. },
  671. handleSelectEqCodeCont(item, row) {
  672. console.log('备件名称/设备内部编号模糊查询选中值', item)
  673. console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
  674. this.$set(row, 'eqName', item.eqName)
  675. this.$set(row, 'sealNumberHis', item.sealNumberHis)
  676. this.$forceUpdate()
  677. },
  678. blurSelectEqNameCont(item, row) {
  679. this.$set(row, 'eqName', '')
  680. this.$set(row, 'eqCode', '')
  681. },
  682. blurSelectEqCodeCont(item, row) {
  683. this.$set(row, 'eqName', '')
  684. this.$set(row, 'eqCode', '')
  685. },
  686. get_select_list() {
  687. GetDataByNames(this.send_select_list).then(response => {
  688. this.pastureNameList = response.data.findAllPasture.list
  689. this.findAllPasture = response.data.findAllMainPasture.list
  690. console.log("牧场下拉框", this.pastureNameList)
  691. this.employeNameList = response.data.findAllEmploye.list
  692. console.log("申请人下拉框", this.employeNameList)
  693. this.providerNameList = response.data.findAllProviderByCt.list
  694. this.tableObj1.getdataListParm.parammaps.pastureArr = this.findAllPasture.map(item => {
  695. return item.name
  696. })
  697. this.get_table_data1()
  698. this.get_depart_list1()
  699. })
  700. },
  701. change_pasture1(item) {
  702. this.getDepartParam1.parammaps.pastureId = this.pastureNameList.find(obj => obj.name == item).id
  703. this.tableObj1.getdataListParm.parammaps.departmentId = ''
  704. this.get_depart_list1()
  705. },
  706. //部门List
  707. get_depart_list1() {
  708. GetDataByName(this.getDepartParam1).then(response => {
  709. this.departNameList1 = response.data.list
  710. })
  711. },
  712. change_pasture2(item) {
  713. this.getDepartParam2.parammaps.pastureId = item
  714. this.get_depart_list2()
  715. },
  716. get_depart_list2() {
  717. GetDataByName(this.getDepartParam2).then(response => {
  718. this.departNameList2 = response.data.list
  719. })
  720. },
  721. change_depart2(item) {
  722. this.createTemp.departmentName = this.departNameList2.find(obj => obj.id == item).name
  723. },
  724. get_table_data1() {
  725. this.tableObj1.listLoading = false
  726. if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
  727. this.tableObj1.getdataListParm.parammaps.startdate = this.$refs['inputDatetime'].value[0]
  728. this.tableObj1.getdataListParm.parammaps.enddate = this.$refs['inputDatetime'].value[1]
  729. } else {
  730. this.tableObj1.getdataListParm.parammaps.inputDatetime = ''
  731. this.tableObj1.getdataListParm.parammaps.startdate = ''
  732. this.tableObj1.getdataListParm.parammaps.enddate = ''
  733. }
  734. // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
  735. if (this.tableObj1.getdataListParm.parammaps.pastureArr && this.tableObj1.getdataListParm.parammaps.pastureArr.length > 0) {
  736. const arr = this.findAllPasture.filter((item) => {
  737. if (this.tableObj1.getdataListParm.parammaps.pastureArr.includes(item.name)) {
  738. return item
  739. }
  740. })
  741. const ids = arr.map((child) => { return child.id })
  742. this.tableObj1.getdataListParm.parammaps.pastureId = ids.toString();
  743. }
  744. GetDataByName(this.tableObj1.getdataListParm).then(response => {
  745. if (response.data.list !== null) {
  746. this.tableObj1.list = response.data.list.map((item)=>{
  747. // 如果当前牧场塞四, 且是塞二和塞三的牧场,则 可展示审核1 按钮,其他状态不变
  748. // 1. 如果是自身牧场 按照之前的走,都是true
  749. // 2. 如果是塞四:false
  750. if(item.pastureId != Cookies.get('mainpasture') && item.pastureId != Cookies.get('pastureid') ) {
  751. item.isPasturd = false
  752. } else {
  753. item.isPasturd = true;
  754. }
  755. return item
  756. })
  757. this.tableObj1.pageNum = response.data.pageNum
  758. this.tableObj1.pageSize = response.data.pageSize
  759. this.tableObj1.total = response.data.total
  760. } else {
  761. this.tableObj1.list = [ ]
  762. }
  763. setTimeout(() => {
  764. this.tableObj1.listLoading = false
  765. }, 100)
  766. })
  767. },
  768. form_search() {
  769. console.log('查询')
  770. this.get_table_data1()
  771. },
  772. change_contract(val) {
  773. console.log(val)
  774. if(val ==1){
  775. this.createTemp.contract = 1
  776. } else {
  777. this.createTemp.contract = 0
  778. }
  779. },
  780. form_add() {
  781. this.reset_create()
  782. this.getDepartParam2.parammaps.pastureId = this.createTemp.pastureId
  783. this.get_depart_list2()
  784. this.dialogStatus = 'create'
  785. this.dialogFormVisible = true
  786. this.listLoading = false
  787. this.$nextTick(() => {
  788. this.$refs['createTemp'].clearValidate()
  789. })
  790. //新增生成单号
  791. this.get_create_num()
  792. },
  793. reset_create() {
  794. this.createTemp.pastureId = parseInt(Cookies.get('pastureid'))
  795. this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
  796. if(parseInt(Cookies.get('pastureid')) == 18){
  797. this.createTemp.departmentId = ""
  798. }
  799. this.createTemp.departmentName = Cookies.get('departmentname')
  800. this.createTemp.employeId = parseInt(Cookies.get('employeid'))
  801. this.createTemp.date = parseTime(new Date(), '{y}-{m}-{d}')
  802. this.createTemp.outsourcingCode = ''
  803. this.createTemp.applicant = parseInt(Cookies.get('employeid'))
  804. this.createTemp.providerId = ''
  805. this.createTemp.contract = 1
  806. this.createTemp.description = ''
  807. this.listAddCont = [{providerName:"",providerId: "0",eqId: "0",contractId: "0",amount:"",contractCode:"",date:"",eqCode:"",eqName:"",remark:"",typea:"",sealNumber:"",sealNumberHis:""}]
  808. },
  809. get_create_num() {
  810. GetDataByName(this.getParmCreateNumber).then(response => {
  811. this.$nextTick(() => {
  812. console.log('新增单号', response.data.list[0].orderCode)
  813. this.createTemp.outsourcingCode = response.data.list[0].orderCode
  814. this.$forceUpdate()
  815. })
  816. })
  817. },
  818. add_dialog_save() {
  819. console.log(this.listAddCont,'000')
  820. this.isokDisable = true
  821. setTimeout(() => {
  822. this.isokDisable = false
  823. }, 1000)
  824. this.$refs['createTemp'].validate(valid => {
  825. if (valid) {
  826. if (this.createTemp.outsourcingCode == '' || this.createTemp.outsourcingCode == null || this.createTemp.outsourcingCode == undefined) {
  827. GetDataByName(this.getParmCreateNumber2).then(response => {
  828. this.$nextTick(() => {
  829. console.log('新增单号', response.data.list[0].orderCode)
  830. this.createTemp.outsourcingCode = response.data.list[0].orderCode
  831. this.$forceUpdate()
  832. this.add_dialog_saveSave()
  833. })
  834. })
  835. } else {
  836. this.add_dialog_saveSave()
  837. }
  838. }
  839. })
  840. },
  841. add_dialog_saveSave() {
  842. for (var j = 0; j < this.listAddCont.length; j++) {
  843. console.log(this.listAddCont[j].amount)
  844. if(this.createTemp.contract == 1){
  845. if(this.listAddCont[j].providerName == ''){
  846. this.$message({ type: 'warning', message: '请检查供应商是否未填写', duration: 2000 })
  847. return false
  848. }
  849. }
  850. if(this.listAddCont[j].eqName == ''){
  851. this.$message({ type: 'warning', message: '请检查设备名称是否未填写', duration: 2000 })
  852. return false
  853. }
  854. if(this.listAddCont[j].eqCode == ''){
  855. this.$message({ type: 'warning', message: '请检查设备内部编号是否未填写', duration: 2000 })
  856. return false
  857. }
  858. if (this.listAddCont[j].amount == null || this.listAddCont[j].amount === '') {
  859. // this.$message({ type: 'warning', message: '请检查金额是否未填写', duration: 2000 })
  860. // return false
  861. } else {
  862. // var rulesAmount = /^[1-9]\d*$/
  863. // if (!rulesAmount.test(this.listAddCont[j].amount)) {
  864. // this.$message({ type: 'error', message: '申购数量请输入正整数', duration: 2000 })
  865. // return false
  866. // }
  867. }
  868. if (this.createTemp.contract == 1){
  869. if (this.listAddCont[j].contractCode == null || this.listAddCont[j].contractCode === '') {
  870. this.$message({ type: 'warning', message: '请检查合同编号是否未填写', duration: 2000 })
  871. return false
  872. }
  873. }
  874. }
  875. var amount = 0
  876. if(this.createTemp.contract==0){
  877. amount = "@insertSpotList.amount"
  878. }else{
  879. amount = 0
  880. }
  881. if(this.createTemp.contract == 0){
  882. // 无合同
  883. this.$set(this.createTemp,'status',0)
  884. }else{
  885. // 有合同
  886. this.$set(this.createTemp,'status',1)
  887. }
  888. var send_data = {
  889. "common": { "returnmap": "0" },
  890. "data": [
  891. {
  892. "name": "addBigoutsourcing", "type": "e",
  893. "parammaps": this.createTemp
  894. },
  895. {
  896. "name": "insertSpotList",
  897. "resultmaps": { "list": this.listAddCont },
  898. "children": [
  899. {
  900. "name": "addOutsourcing", "type": "e",
  901. "parammaps": {
  902. "bigId": "@addBigoutsourcing.LastInsertId",
  903. "providerId": "@insertSpotList.providerId",
  904. "amount": amount,
  905. "eqId": "@insertSpotList.eqId",
  906. "eqCode": "@insertSpotList.eqCode",
  907. "eqName": "@insertSpotList.eqName",
  908. "typea": "@insertSpotList.typea",
  909. "date": "@insertSpotList.date",
  910. "contractId": "@insertSpotList.contractId",
  911. "providerName": "@insertSpotList.providerName",
  912. "contractCode": "@insertSpotList.contractCode",
  913. "remark": "@insertSpotList.remark",
  914. "status": this.createTemp.status,
  915. "sealNumber": "@insertSpotList.sealNumber",
  916. "sealNumberHis" : "@insertSpotList.sealNumberHis"
  917. }
  918. }
  919. ]
  920. }
  921. ]
  922. }
  923. ExecDataByConfig(send_data).then(response => {
  924. console.log('新增保存发送参数', send_data)
  925. if (response.msg === 'fail') {
  926. this.$notify({
  927. title: '保存失败',
  928. message: response.data,
  929. type: 'warning',
  930. duration: 2000
  931. })
  932. } else {
  933. if(this.createTemp.contract==1){
  934. this.add_dialog_saveSave2()
  935. }
  936. this.dialogFormVisible = false
  937. this.get_table_data1()
  938. this.$notify({
  939. title: '',
  940. message: '保存成功',
  941. type: 'success',
  942. duration: 2000
  943. })
  944. }
  945. })
  946. return true
  947. },
  948. form_see(row){
  949. console.log('查看======》',row)
  950. this.getDepartParam2.parammaps.pastureId = row.pastureId
  951. this.get_depart_list2()
  952. this.createTemp = Object.assign({}, row)
  953. this.dialogStatus = 'see'
  954. this.dialogFormVisible = true
  955. this.$nextTick(() => {
  956. this.$refs['createTemp'].clearValidate()
  957. })
  958. //总价大于等于10000,有高级设备工程师
  959. if(row.isAudit == 1) {
  960. if (row.flowCompeleted == 1) {
  961. this.activeList = [
  962. { title: '设备处长', date: row.createTime, name: row.applicantName },
  963. { title: '部门负责人' },
  964. { title: '财务负责人' },
  965. { title: '场长' },
  966. { title: '运营支持部高级工程师' },
  967. ]
  968. this.active = 1
  969. } else if (row.flowCompeleted == 2) {
  970. this.activeList = [
  971. { title: '设备处长', date: row.createTime, name: row.applicantName },
  972. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  973. { title: '财务负责人' },
  974. { title: '场长' },
  975. { title: '运营支持部高级工程师' },
  976. ]
  977. this.active = 2
  978. } else if (row.flowCompeleted === 3) {
  979. this.activeList = [
  980. { title: '设备处长', date: row.createTime, name: row.applicantName },
  981. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName,status: 'error', reason: row.workflowNote },
  982. { title: '财务负责人' },
  983. { title: '场长' },
  984. { title: '运营支持部高级工程师' }
  985. ]
  986. this.active = 2
  987. } else if (row.flowCompeleted === 4) {
  988. this.activeList = [
  989. { title: '设备处长', date: row.createTime, name: row.applicantName },
  990. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  991. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  992. { title: '场长' },
  993. { title: '运营支持部高级工程师' }
  994. ]
  995. this.active = 3
  996. } else if (row.flowCompeleted === 5) {
  997. this.activeList = [
  998. { title: '设备处长', date: row.createTime, name: row.applicantName },
  999. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1000. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName,status: 'error', reason: row.workflowNote },
  1001. { title: '场长' },
  1002. { title: '运营支持部高级工程师' }
  1003. ]
  1004. this.active = 3
  1005. } else if (row.flowCompeleted === 6) {
  1006. this.activeList = [
  1007. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1008. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1009. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1010. { title: '场长',date: row.fielddate, name: row.fieldName },
  1011. { title: '运营支持部高级工程师' }
  1012. ]
  1013. this.active = 4
  1014. } else if (row.flowCompeleted === 7) {
  1015. this.activeList = [
  1016. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1017. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1018. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1019. { title: '场长',date: row.fielddate, name: row.fieldName,status: 'error', reason: row.workflowNote },
  1020. { title: '运营支持部高级工程师' }
  1021. ]
  1022. this.active = 4
  1023. }else if (row.flowCompeleted === 8) {
  1024. this.activeList = [
  1025. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1026. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1027. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1028. { title: '场长',date: row.fielddate, name: row.fieldName },
  1029. { title: '运营支持部高级工程师',date: row.advanceddate, name: row.advancedName }
  1030. ]
  1031. this.active = 5
  1032. }else if (row.flowCompeleted === 9) {
  1033. this.activeList = [
  1034. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1035. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1036. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1037. { title: '场长',date: row.fielddate, name: row.fieldName},
  1038. { title: '运营支持部高级工程师',date: row.advanceddate, name: row.advancedName,status: 'error', reason: row.workflowNote }
  1039. ]
  1040. this.active = 5
  1041. }
  1042. //总价小于10000 没有高级设备工程师,直接场长审核
  1043. } else {
  1044. if (row.flowCompeleted == 1) {
  1045. this.activeList = [
  1046. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1047. { title: '部门负责人' },
  1048. { title: '财务负责人' },
  1049. { title: '场长' }
  1050. ]
  1051. this.active = 1
  1052. } else if (row.flowCompeleted == 2) {
  1053. this.activeList = [
  1054. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1055. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1056. { title: '财务负责人' },
  1057. { title: '场长' }
  1058. ]
  1059. this.active = 2
  1060. } else if (row.flowCompeleted === 3) {
  1061. this.activeList = [
  1062. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1063. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName,status: 'error', reason: row.workflowNote },
  1064. { title: '财务负责人' },
  1065. { title: '场长' }
  1066. ]
  1067. this.active = 2
  1068. } else if (row.flowCompeleted === 4) {
  1069. this.activeList = [
  1070. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1071. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1072. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1073. { title: '场长' },
  1074. ]
  1075. this.active = 3
  1076. } else if (row.flowCompeleted === 5) {
  1077. this.activeList = [
  1078. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1079. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1080. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName,status: 'error', reason: row.workflowNote },
  1081. { title: '场长' }
  1082. ]
  1083. this.active = 3
  1084. } else if (row.flowCompeleted === 6) {
  1085. this.activeList = [
  1086. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1087. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1088. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1089. { title: '场长',date: row.fielddate, name: row.fieldName },
  1090. ]
  1091. this.active = 4
  1092. } else if (row.flowCompeleted === 7) {
  1093. this.activeList = [
  1094. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1095. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1096. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1097. { title: '场长',date: row.fielddate, name: row.fieldName,status: 'error', reason: row.workflowNote }
  1098. ]
  1099. this.active = 4
  1100. }
  1101. }
  1102. if(row.contract == 1){
  1103. this.activeList = [
  1104. { title: '设备处长', date: row.createTime, name: row.applicantName }
  1105. ]
  1106. this.active = 1
  1107. }
  1108. this.getAddContListParam.parammaps.bigId = row.id
  1109. this.getAddContList()
  1110. },
  1111. getAddContList() {
  1112. GetDataByName(this.getAddContListParam).then(response => {
  1113. this.listAddCont = response.data.list
  1114. this.listLoading = false
  1115. })
  1116. },
  1117. form_edit(row) {
  1118. this.reset_create()
  1119. console.log('编辑',row)
  1120. this.getDepartParam2.parammaps.pastureId = row.pastureId
  1121. this.get_depart_list2()
  1122. if (row.providerId == undefined) {
  1123. row.providerId = ''
  1124. row.providerName = ''
  1125. }
  1126. this.createTemp = Object.assign({}, row) // copy obj
  1127. this.dialogStatus = 'update'
  1128. this.dialogFormVisible = true
  1129. this.$nextTick(() => {
  1130. this.$refs['createTemp'].clearValidate()
  1131. })
  1132. this.getAddContListParam.parammaps.bigId = row.id
  1133. this.getAddContList()
  1134. },
  1135. edit_dialog_save() {
  1136. this.isokDisable = true
  1137. setTimeout(() => {
  1138. this.isokDisable = false
  1139. }, 1000)
  1140. this.$refs['createTemp'].validate(valid => {
  1141. if (valid) {
  1142. this.edit_dialog_saveSave()
  1143. }
  1144. })
  1145. },
  1146. edit_dialog_saveSave() {
  1147. for (var j = 0; j < this.listAddCont.length; j++) {
  1148. console.log(this.listAddCont[j].amount)
  1149. // eslint-disable-next-line use-isnan
  1150. if (this.listAddCont[j].amount == null || this.listAddCont[j].amount === '') {
  1151. this.$message({ type: 'warning', message: '请检查申购数量是否未填写', duration: 2000 })
  1152. return false
  1153. }
  1154. }
  1155. this.listAddCont[0].providerId = "0"
  1156. this.listAddCont[0].eqId = "0"
  1157. this.listAddCont[0].contractId = "0"
  1158. var amount = 0
  1159. if(this.createTemp.contract==0){
  1160. amount = "@insertSpotList.amount"
  1161. }else{
  1162. amount = 0
  1163. }
  1164. var send_data = {
  1165. "common": { "returnmap": "0" },
  1166. "data": [
  1167. {
  1168. "name": "editBigoutsourcing", "type": "e",
  1169. "parammaps": this.createTemp
  1170. },
  1171. {
  1172. "name": "insertSpotList",
  1173. "resultmaps": { "list": this.listAddCont },
  1174. "children": [
  1175. {
  1176. "name": "editOutsourcing", "type": "e",
  1177. "parammaps": {
  1178. "bigId": "@insertSpotList.LastInsertId",
  1179. "providerId": "@insertSpotList.providerId",
  1180. "amount": amount,
  1181. "eqId": "@insertSpotList.eqId",
  1182. "eqCode": "@insertSpotList.eqCode",
  1183. "eqName": "@insertSpotList.eqName",
  1184. "typea": "@insertSpotList.typea",
  1185. "date": "@insertSpotList.date",
  1186. "contractId": "@insertSpotList.contractId",
  1187. "id": "@insertSpotList.id",
  1188. "providerName": "@insertSpotList.providerName",
  1189. "contractCode": "@insertSpotList.contractCode"
  1190. }
  1191. }
  1192. ]
  1193. },
  1194. {
  1195. "name": "updateBigoutsourcingFlowCompeleted", "type": "e",
  1196. "parammaps":{
  1197. id:this.createTemp.id
  1198. }
  1199. },
  1200. ]
  1201. }
  1202. ExecDataByConfig(send_data).then(response => {
  1203. console.log('新增保存发送参数', send_data)
  1204. if (response.msg === 'fail') {
  1205. this.$notify({
  1206. title: '保存失败',
  1207. message: response.data,
  1208. type: 'warning',
  1209. duration: 2000
  1210. })
  1211. } else {
  1212. this.dialogFormVisible = false
  1213. this.get_table_data1()
  1214. this.$notify({
  1215. title: '',
  1216. message: '保存成功',
  1217. type: 'success',
  1218. duration: 2000
  1219. })
  1220. }
  1221. })
  1222. },
  1223. form_delete(row) {
  1224. console.log('点击了删除',row)
  1225. MessageBox.confirm('确认删除此条信息?', {
  1226. confirmButtonText: '确认',
  1227. cancelButtonText: '取消',
  1228. type: 'warning'
  1229. }).then(() => {
  1230. var send_data = {
  1231. "common": { "returnmap": "0" },
  1232. "data": [
  1233. {
  1234. "name": "deleteBigoutsourcing", "type": "e",
  1235. "parammaps": { "id":row.id }
  1236. }
  1237. ]
  1238. }
  1239. ExecDataByConfig(send_data).then(response => {
  1240. this.get_table_data1()
  1241. this.$notify({
  1242. title: '成功',
  1243. message: '删除成功',
  1244. type: 'success',
  1245. duration: 2000
  1246. })
  1247. })
  1248. }).catch(() => {
  1249. this.$message({
  1250. type: 'info',
  1251. message: '已取消删除'
  1252. })
  1253. })
  1254. },
  1255. change_statue(val) {
  1256. if (val == 2) {
  1257. this.statueReason = true
  1258. } else {
  1259. this.statueReason = false
  1260. }
  1261. },
  1262. form_examine(row) {
  1263. console.log('点击了设备处长审核',row)
  1264. if (row == undefined) {
  1265. this.examineTemp = this.createTemp
  1266. this.$set(this.createTemp, 'status', 1)
  1267. this.$set(this.createTemp, 'workflowNote', '')
  1268. } else {
  1269. this.examineTemp = Object.assign({}, row)
  1270. this.$set(this.examineTemp, 'status', 1)
  1271. this.$set(this.examineTemp, 'workflowNote', '')
  1272. }
  1273. // this.dialogStatus = 'examine'
  1274. this.dialogStatus = 'check1'
  1275. this.dialogFormVisible_Examine = true
  1276. this.statueReason = false
  1277. },
  1278. form_examine_save() {
  1279. console.log('点击了设备处长审核', this.examineTemp)
  1280. this.isokDisable = true
  1281. setTimeout(() => {
  1282. this.isokDisable = false
  1283. }, 1000)
  1284. this.$refs['examineTemp'].validate(valid => {
  1285. if (valid) {
  1286. //不通过
  1287. if(this.statueReason){
  1288. this.examineTemp.status = 2
  1289. //审核角色
  1290. this.examineTemp.flowCompeleted = "3"
  1291. } else {
  1292. this.examineTemp.status = 0
  1293. this.examineTemp.flowCompeleted = "2"
  1294. }
  1295. this.examineTemp.empid = Cookies.get('employeid')
  1296. var send_data = {
  1297. "common": { "returnmap": "0" },
  1298. "data": [
  1299. // {
  1300. // "name": "editBigoutsourcingEquipment", "type": "e",
  1301. // "parammaps": this.examineTemp
  1302. // },
  1303. {
  1304. "name": "editBigoutsourcingDepartment", "type": "e",
  1305. "parammaps": this.examineTemp
  1306. }
  1307. ]
  1308. }
  1309. console.log(send_data,'审核1保存')
  1310. ExecDataByConfig(send_data).then(response => {
  1311. console.log('审核确认发送参数', send_data)
  1312. if (response.msg !== 'fail') {
  1313. this.get_table_data1()
  1314. this.dialogFormVisible_Examine = false
  1315. this.statueReason = false
  1316. this.$notify({
  1317. title: '成功',
  1318. message: '审核成功',
  1319. type: 'success',
  1320. duration: 2000
  1321. })
  1322. } else {
  1323. failproccess(response, this.$notify)
  1324. }
  1325. })
  1326. }
  1327. })
  1328. },
  1329. form_examine2(row) {
  1330. console.log('点击了场长审核',row)
  1331. this.examineTemp = Object.assign({}, row)
  1332. if (row == undefined) {
  1333. // this.examineTemp = this.createTemp
  1334. this.$set(this.createTemp, 'status', 1)
  1335. this.$set(this.createTemp, 'workflowNote', '')
  1336. } else {
  1337. this.$set(this.examineTemp, 'status', 1)
  1338. this.$set(this.examineTemp, 'workflowNote', '')
  1339. }
  1340. // this.dialogStatus = 'examine'
  1341. this.dialogStatus = 'check2'
  1342. this.statueReason = false
  1343. this.dialogFormVisible_Examine = true
  1344. // GetDataByName(this.getParmCreateNumber).then(response => {
  1345. // this.$nextTick(() => {
  1346. // console.log('新增单号', response.data.list[0].orderCode)
  1347. // this.examineTemp.acceptanceCode = response.data.list[0].orderCode
  1348. // this.$set(this.examineTemp,'acceptanceCode',response.data.list[0].orderCode)
  1349. // this.$forceUpdate()
  1350. // })
  1351. // })
  1352. },
  1353. add_dialog_saveSave2() {
  1354. console.log(this.examineTemp,'=====---hss')
  1355. // this.examineTemp.iscontract =
  1356. //牧场
  1357. var mydata = {
  1358. // acceptanceCode:this.createTemp.acceptanceCode,
  1359. pastureId: this.createTemp.pastureId,
  1360. departmentId: this.createTemp.departmentId,
  1361. applicant:Cookies.get('employeid'),
  1362. outsourcingCode:this.examineTemp.outsourcingCode,
  1363. applyType:0,
  1364. date:parseTime(new Date(), '{y}-{m}-{d}'),
  1365. status:1
  1366. }
  1367. if(this.examineTemp.contract == 0){
  1368. mydata.iscontract = 1
  1369. }else{
  1370. mydata.iscontract = 0
  1371. }
  1372. var send_data = {
  1373. "common": { "returnmap": "0" },
  1374. "data": [
  1375. {
  1376. "name": "insertBigacceptance",
  1377. "type": "e",
  1378. "parammaps": mydata
  1379. }
  1380. ]
  1381. }
  1382. ExecDataByConfig(send_data).then(response => {
  1383. console.log('新增保存发送参数', send_data)
  1384. if (response.msg === 'fail') {
  1385. this.$notify({
  1386. title: '保存失败',
  1387. message: response.data,
  1388. type: 'warning',
  1389. duration: 2000
  1390. })
  1391. } else {
  1392. // this.$notify({
  1393. // title: '',
  1394. // message: '保存成功',
  1395. // type: 'success',
  1396. // duration: 2000
  1397. // })
  1398. }
  1399. })
  1400. },
  1401. form_examine_save2() {
  1402. console.log('点击了场长审核', this.examineTemp)
  1403. this.isokDisable = true
  1404. setTimeout(() => {
  1405. this.isokDisable = false
  1406. }, 1000)
  1407. // this.examineTemp.acceptanceCode = this.createTemp.acceptanceCode
  1408. this.$refs['examineTemp'].validate(valid => {
  1409. if (valid) {
  1410. //不通过
  1411. if(this.statueReason){
  1412. this.examineTemp.status = 2
  1413. //审核角色
  1414. this.examineTemp.flowCompeleted = "5"
  1415. } else {
  1416. // //总价大于等于10000 有高级设备工程师审核
  1417. // if(this.examineTemp.isAudit == 1){
  1418. // this.examineTemp.status = 0
  1419. // //总价小于10000 没有高级设备工程师,直接场长审核
  1420. // } else {
  1421. // this.examineTemp.status = 1
  1422. // }
  1423. this.examineTemp.status = 0
  1424. this.examineTemp.flowCompeleted = "4"
  1425. }
  1426. this.examineTemp.empid = Cookies.get('employeid')
  1427. var send_data = {
  1428. "common": { "returnmap": "0" },
  1429. "data": [
  1430. // {
  1431. // "name": "editBigoutsourcingField", "type": "e",
  1432. // "parammaps": this.examineTemp
  1433. // },
  1434. {
  1435. "name": "editBigoutsourcingEquipment", "type": "e",
  1436. "parammaps": this.examineTemp
  1437. }
  1438. ]
  1439. }
  1440. console.log(send_data,'审核2保存')
  1441. ExecDataByConfig(send_data).then(response => {
  1442. console.log('审核确认发送参数', send_data)
  1443. if (response.msg !== 'fail') {
  1444. if(this.examineTemp.status == 1){
  1445. this.add_dialog_saveSave2()
  1446. }
  1447. this.get_table_data1()
  1448. this.dialogFormVisible_Examine = false
  1449. this.statueReason = false
  1450. this.$notify({
  1451. title: '成功',
  1452. message: '审核成功',
  1453. type: 'success',
  1454. duration: 2000
  1455. })
  1456. } else {
  1457. failproccess(response, this.$notify)
  1458. }
  1459. })
  1460. }
  1461. })
  1462. },
  1463. form_examine3(row) {
  1464. console.log('点击了高级工程师 审核',row)
  1465. this.examineTemp = Object.assign({}, row)
  1466. if (row == undefined) {
  1467. //this.examineTemp = this.createTemp
  1468. this.$set(this.createTemp, 'status', 1)
  1469. this.$set(this.createTemp, 'workflowNote', '')
  1470. } else {
  1471. this.$set(this.examineTemp, 'status', 1)
  1472. this.$set(this.examineTemp, 'workflowNote', '')
  1473. }
  1474. // this.dialogStatus = 'examine'
  1475. this.dialogStatus = 'check3'
  1476. this.dialogFormVisible_Examine = true
  1477. this.statueReason = false
  1478. },
  1479. form_examine_save3() {
  1480. console.log('点击了高级工程师审核',this.examineTemp )
  1481. this.isokDisable = true
  1482. setTimeout(() => {
  1483. this.isokDisable = false
  1484. }, 1000)
  1485. this.$refs['examineTemp'].validate(valid => {
  1486. if (valid) {
  1487. //不通过
  1488. if(this.statueReason){
  1489. this.examineTemp.status = 2
  1490. //审核角色
  1491. this.examineTemp.flowCompeleted = "7"
  1492. } else {
  1493. //总价大于等于10000 有高级设备工程师审核
  1494. if(this.examineTemp.isAudit == 1){
  1495. this.examineTemp.status = 0
  1496. //总价小于10000 没有高级设备工程师,直接场长审核
  1497. } else {
  1498. this.examineTemp.status = 1
  1499. }
  1500. this.examineTemp.flowCompeleted = "6"
  1501. }
  1502. this.examineTemp.empid = Cookies.get('employeid')
  1503. var send_data = {
  1504. "common": { "returnmap": "0" },
  1505. "data": [
  1506. // {
  1507. // "name": "editBigoutsourcingAdvanceddate", "type": "e",
  1508. // "parammaps": this.examineTemp
  1509. // },
  1510. {
  1511. "name": "editBigoutsourcingField", "type": "e",
  1512. "parammaps": this.examineTemp
  1513. }
  1514. ]
  1515. }
  1516. console.log(send_data,'审核3保存',this.examineTemp)
  1517. ExecDataByConfig(send_data).then(response => {
  1518. console.log('审核确认发送参数', send_data)
  1519. if (response.msg !== 'fail') {
  1520. if(this.examineTemp.status == 1){
  1521. this.add_dialog_saveSave2()
  1522. }
  1523. this.get_table_data1()
  1524. this.dialogFormVisible_Examine = false
  1525. this.statueReason = false
  1526. this.$notify({
  1527. title: '成功',
  1528. message: '审核成功',
  1529. type: 'success',
  1530. duration: 2000
  1531. })
  1532. } else {
  1533. failproccess(response, this.$notify)
  1534. }
  1535. })
  1536. }
  1537. })
  1538. },
  1539. form_examine4(row) {
  1540. console.log('点击了高级工程师 审核',row)
  1541. this.examineTemp = Object.assign({}, row)
  1542. if (row == undefined) {
  1543. //this.examineTemp = this.createTemp
  1544. this.$set(this.createTemp, 'status', 1)
  1545. this.$set(this.createTemp, 'workflowNote', '')
  1546. } else {
  1547. this.$set(this.examineTemp, 'status', 1)
  1548. this.$set(this.examineTemp, 'workflowNote', '')
  1549. }
  1550. this.dialogStatus = 'examine'
  1551. this.dialogFormVisible_Examine = true
  1552. this.statueReason = false
  1553. },
  1554. form_examine_save4() {
  1555. console.log('点击了高级工程师审核',this.examineTemp )
  1556. this.isokDisable = true
  1557. setTimeout(() => {
  1558. this.isokDisable = false
  1559. }, 1000)
  1560. this.$refs['examineTemp'].validate(valid => {
  1561. if (valid) {
  1562. //不通过
  1563. if(this.statueReason){
  1564. this.examineTemp.status = 2
  1565. //审核角色
  1566. this.examineTemp.flowCompeleted = "9"
  1567. } else {
  1568. this.examineTemp.status = 1
  1569. this.examineTemp.flowCompeleted = "8"
  1570. }
  1571. this.examineTemp.empid = Cookies.get('employeid')
  1572. var send_data = {
  1573. "common": { "returnmap": "0" },
  1574. "data": [
  1575. // {
  1576. // "name": "editBigoutsourcingAdvanceddate", "type": "e",
  1577. // "parammaps": this.examineTemp
  1578. // },
  1579. {
  1580. "name": "editBigoutsourcingAdvanceddate", "type": "e",
  1581. "parammaps": this.examineTemp
  1582. }
  1583. ]
  1584. }
  1585. console.log(send_data,'审核4保存')
  1586. ExecDataByConfig(send_data).then(response => {
  1587. console.log('审核确认发送参数', send_data)
  1588. if (response.msg !== 'fail') {
  1589. if(this.examineTemp.status == 1){
  1590. this.add_dialog_saveSave2()
  1591. }
  1592. this.get_table_data1()
  1593. this.dialogFormVisible_Examine = false
  1594. this.statueReason = false
  1595. this.$notify({
  1596. title: '成功',
  1597. message: '审核成功',
  1598. type: 'success',
  1599. duration: 2000
  1600. })
  1601. } else {
  1602. failproccess(response, this.$notify)
  1603. }
  1604. })
  1605. }
  1606. })
  1607. },
  1608. }
  1609. }
  1610. </script>
  1611. <style lang="scss" scoped>
  1612. .select_up {
  1613. padding: 0 12px;
  1614. font-size: 14px;
  1615. position: absolute;
  1616. z-index: 99999;
  1617. background-color: white;
  1618. top: 0px;
  1619. width: 100%;
  1620. border-radius: 5px 5px 0 0;
  1621. ::v-deep .el-button {
  1622. color: #bcbcbc;
  1623. font-size: 14px;
  1624. i {
  1625. font-size: 14px;
  1626. }
  1627. }
  1628. ::v-deep .el-button:hover {
  1629. color: #409EFF;
  1630. }
  1631. .el-button+.el-button {
  1632. margin-left: 6px;
  1633. }
  1634. }
  1635. .select_list {
  1636. margin-top: 25px;
  1637. }
  1638. // .content{
  1639. // padding: 20px 20px;
  1640. // .title{
  1641. // text-align: center;
  1642. // font-weight: 700;
  1643. // }
  1644. // .title2{
  1645. // float: left;
  1646. // font-weight: 700;
  1647. // padding: 10px 0;
  1648. // }
  1649. // }
  1650. </style>