tab1.vue 71 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857
  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,'')
  844. console.log(this.listAddCont[j].amount)
  845. if(this.createTemp.contract == 1){
  846. if(this.listAddCont[j].providerName == ''){
  847. this.$message({ type: 'warning', message: '请检查供应商是否未填写', duration: 2000 })
  848. return false
  849. }
  850. }
  851. if(this.listAddCont[j].sealNumber == ''){
  852. this.$message({ type: 'warning', message: '请填写铅封号', duration: 2000 })
  853. return false
  854. }
  855. if(this.listAddCont[j].eqName == ''){
  856. this.$message({ type: 'warning', message: '请检查设备名称是否未填写', duration: 2000 })
  857. return false
  858. }
  859. if(this.listAddCont[j].eqCode == ''){
  860. this.$message({ type: 'warning', message: '请检查设备内部编号是否未填写', duration: 2000 })
  861. return false
  862. }
  863. if (this.listAddCont[j].amount == null || this.listAddCont[j].amount === '') {
  864. // this.$message({ type: 'warning', message: '请检查金额是否未填写', duration: 2000 })
  865. // return false
  866. } else {
  867. // var rulesAmount = /^[1-9]\d*$/
  868. // if (!rulesAmount.test(this.listAddCont[j].amount)) {
  869. // this.$message({ type: 'error', message: '申购数量请输入正整数', duration: 2000 })
  870. // return false
  871. // }
  872. }
  873. if (this.createTemp.contract == 1){
  874. if (this.listAddCont[j].contractCode == null || this.listAddCont[j].contractCode === '') {
  875. this.$message({ type: 'warning', message: '请检查合同编号是否未填写', duration: 2000 })
  876. return false
  877. }
  878. }
  879. }
  880. var amount = 0
  881. if(this.createTemp.contract==0){
  882. amount = "@insertSpotList.amount"
  883. }else{
  884. amount = 0
  885. }
  886. if(this.createTemp.contract == 0){
  887. // 无合同
  888. this.$set(this.createTemp,'status',0)
  889. }else{
  890. // 有合同
  891. this.$set(this.createTemp,'status',1)
  892. }
  893. var send_data = {
  894. "common": { "returnmap": "0" },
  895. "data": [
  896. {
  897. "name": "addBigoutsourcing", "type": "e",
  898. "parammaps": this.createTemp
  899. },
  900. {
  901. "name": "insertSpotList",
  902. "resultmaps": { "list": this.listAddCont },
  903. "children": [
  904. {
  905. "name": "addOutsourcing", "type": "e",
  906. "parammaps": {
  907. "bigId": "@addBigoutsourcing.LastInsertId",
  908. "providerId": "@insertSpotList.providerId",
  909. "amount": amount,
  910. "eqId": "@insertSpotList.eqId",
  911. "eqCode": "@insertSpotList.eqCode",
  912. "eqName": "@insertSpotList.eqName",
  913. "typea": "@insertSpotList.typea",
  914. "date": "@insertSpotList.date",
  915. "contractId": "@insertSpotList.contractId",
  916. "providerName": "@insertSpotList.providerName",
  917. "contractCode": "@insertSpotList.contractCode",
  918. "remark": "@insertSpotList.remark",
  919. "status": this.createTemp.status,
  920. "sealNumber": "@insertSpotList.sealNumber",
  921. "sealNumberHis" : "@insertSpotList.sealNumberHis"
  922. }
  923. }
  924. ]
  925. }
  926. ]
  927. }
  928. ExecDataByConfig(send_data).then(response => {
  929. console.log('新增保存发送参数', send_data)
  930. if (response.msg === 'fail') {
  931. this.$notify({
  932. title: '保存失败',
  933. message: response.data,
  934. type: 'warning',
  935. duration: 2000
  936. })
  937. } else {
  938. if(this.createTemp.contract==1){
  939. this.add_dialog_saveSave2()
  940. }
  941. this.dialogFormVisible = false
  942. this.get_table_data1()
  943. this.$notify({
  944. title: '',
  945. message: '保存成功',
  946. type: 'success',
  947. duration: 2000
  948. })
  949. }
  950. })
  951. return true
  952. },
  953. form_see(row){
  954. console.log('查看======》',row)
  955. this.getDepartParam2.parammaps.pastureId = row.pastureId
  956. this.get_depart_list2()
  957. this.createTemp = Object.assign({}, row)
  958. this.dialogStatus = 'see'
  959. this.dialogFormVisible = true
  960. this.$nextTick(() => {
  961. this.$refs['createTemp'].clearValidate()
  962. })
  963. //总价大于等于10000,有高级设备工程师
  964. if(row.isAudit == 1) {
  965. if (row.flowCompeleted == 1) {
  966. this.activeList = [
  967. { title: '设备处长', date: row.createTime, name: row.applicantName },
  968. { title: '部门负责人' },
  969. { title: '财务负责人' },
  970. { title: '场长' },
  971. { title: '运营支持部高级工程师' },
  972. ]
  973. this.active = 1
  974. } else if (row.flowCompeleted == 2) {
  975. this.activeList = [
  976. { title: '设备处长', date: row.createTime, name: row.applicantName },
  977. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  978. { title: '财务负责人' },
  979. { title: '场长' },
  980. { title: '运营支持部高级工程师' },
  981. ]
  982. this.active = 2
  983. } else if (row.flowCompeleted === 3) {
  984. this.activeList = [
  985. { title: '设备处长', date: row.createTime, name: row.applicantName },
  986. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName,status: 'error', reason: row.workflowNote },
  987. { title: '财务负责人' },
  988. { title: '场长' },
  989. { title: '运营支持部高级工程师' }
  990. ]
  991. this.active = 2
  992. } else if (row.flowCompeleted === 4) {
  993. this.activeList = [
  994. { title: '设备处长', date: row.createTime, name: row.applicantName },
  995. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  996. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  997. { title: '场长' },
  998. { title: '运营支持部高级工程师' }
  999. ]
  1000. this.active = 3
  1001. } else if (row.flowCompeleted === 5) {
  1002. this.activeList = [
  1003. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1004. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1005. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName,status: 'error', reason: row.workflowNote },
  1006. { title: '场长' },
  1007. { title: '运营支持部高级工程师' }
  1008. ]
  1009. this.active = 3
  1010. } else if (row.flowCompeleted === 6) {
  1011. this.activeList = [
  1012. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1013. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1014. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1015. { title: '场长',date: row.fielddate, name: row.fieldName },
  1016. { title: '运营支持部高级工程师' }
  1017. ]
  1018. this.active = 4
  1019. } else if (row.flowCompeleted === 7) {
  1020. this.activeList = [
  1021. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1022. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1023. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1024. { title: '场长',date: row.fielddate, name: row.fieldName,status: 'error', reason: row.workflowNote },
  1025. { title: '运营支持部高级工程师' }
  1026. ]
  1027. this.active = 4
  1028. }else if (row.flowCompeleted === 8) {
  1029. this.activeList = [
  1030. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1031. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1032. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1033. { title: '场长',date: row.fielddate, name: row.fieldName },
  1034. { title: '运营支持部高级工程师',date: row.advanceddate, name: row.advancedName }
  1035. ]
  1036. this.active = 5
  1037. }else if (row.flowCompeleted === 9) {
  1038. this.activeList = [
  1039. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1040. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1041. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1042. { title: '场长',date: row.fielddate, name: row.fieldName},
  1043. { title: '运营支持部高级工程师',date: row.advanceddate, name: row.advancedName,status: 'error', reason: row.workflowNote }
  1044. ]
  1045. this.active = 5
  1046. }
  1047. //总价小于10000 没有高级设备工程师,直接场长审核
  1048. } else {
  1049. if (row.flowCompeleted == 1) {
  1050. this.activeList = [
  1051. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1052. { title: '部门负责人' },
  1053. { title: '财务负责人' },
  1054. { title: '场长' }
  1055. ]
  1056. this.active = 1
  1057. } else if (row.flowCompeleted == 2) {
  1058. this.activeList = [
  1059. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1060. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1061. { title: '财务负责人' },
  1062. { title: '场长' }
  1063. ]
  1064. this.active = 2
  1065. } else if (row.flowCompeleted === 3) {
  1066. this.activeList = [
  1067. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1068. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName,status: 'error', reason: row.workflowNote },
  1069. { title: '财务负责人' },
  1070. { title: '场长' }
  1071. ]
  1072. this.active = 2
  1073. } else if (row.flowCompeleted === 4) {
  1074. this.activeList = [
  1075. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1076. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1077. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1078. { title: '场长' },
  1079. ]
  1080. this.active = 3
  1081. } else if (row.flowCompeleted === 5) {
  1082. this.activeList = [
  1083. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1084. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1085. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName,status: 'error', reason: row.workflowNote },
  1086. { title: '场长' }
  1087. ]
  1088. this.active = 3
  1089. } else if (row.flowCompeleted === 6) {
  1090. this.activeList = [
  1091. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1092. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1093. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1094. { title: '场长',date: row.fielddate, name: row.fieldName },
  1095. ]
  1096. this.active = 4
  1097. } else if (row.flowCompeleted === 7) {
  1098. this.activeList = [
  1099. { title: '设备处长', date: row.createTime, name: row.applicantName },
  1100. { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
  1101. { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
  1102. { title: '场长',date: row.fielddate, name: row.fieldName,status: 'error', reason: row.workflowNote }
  1103. ]
  1104. this.active = 4
  1105. }
  1106. }
  1107. if(row.contract == 1){
  1108. this.activeList = [
  1109. { title: '设备处长', date: row.createTime, name: row.applicantName }
  1110. ]
  1111. this.active = 1
  1112. }
  1113. this.getAddContListParam.parammaps.bigId = row.id
  1114. this.getAddContList()
  1115. },
  1116. getAddContList() {
  1117. GetDataByName(this.getAddContListParam).then(response => {
  1118. this.listAddCont = response.data.list
  1119. this.listLoading = false
  1120. })
  1121. },
  1122. form_edit(row) {
  1123. this.reset_create()
  1124. console.log('编辑',row)
  1125. this.getDepartParam2.parammaps.pastureId = row.pastureId
  1126. this.get_depart_list2()
  1127. if (row.providerId == undefined) {
  1128. row.providerId = ''
  1129. row.providerName = ''
  1130. }
  1131. this.createTemp = Object.assign({}, row) // copy obj
  1132. this.dialogStatus = 'update'
  1133. this.dialogFormVisible = true
  1134. this.$nextTick(() => {
  1135. this.$refs['createTemp'].clearValidate()
  1136. })
  1137. this.getAddContListParam.parammaps.bigId = row.id
  1138. this.getAddContList()
  1139. },
  1140. edit_dialog_save() {
  1141. this.isokDisable = true
  1142. setTimeout(() => {
  1143. this.isokDisable = false
  1144. }, 1000)
  1145. this.$refs['createTemp'].validate(valid => {
  1146. if (valid) {
  1147. this.edit_dialog_saveSave()
  1148. }
  1149. })
  1150. },
  1151. edit_dialog_saveSave() {
  1152. for (var j = 0; j < this.listAddCont.length; j++) {
  1153. console.log(this.listAddCont[j].amount)
  1154. // eslint-disable-next-line use-isnan
  1155. if (this.listAddCont[j].amount == null || this.listAddCont[j].amount === '') {
  1156. this.$message({ type: 'warning', message: '请检查申购数量是否未填写', duration: 2000 })
  1157. return false
  1158. }
  1159. }
  1160. this.listAddCont[0].providerId = "0"
  1161. this.listAddCont[0].eqId = "0"
  1162. this.listAddCont[0].contractId = "0"
  1163. var amount = 0
  1164. if(this.createTemp.contract==0){
  1165. amount = "@insertSpotList.amount"
  1166. }else{
  1167. amount = 0
  1168. }
  1169. var send_data = {
  1170. "common": { "returnmap": "0" },
  1171. "data": [
  1172. {
  1173. "name": "editBigoutsourcing", "type": "e",
  1174. "parammaps": this.createTemp
  1175. },
  1176. {
  1177. "name": "insertSpotList",
  1178. "resultmaps": { "list": this.listAddCont },
  1179. "children": [
  1180. {
  1181. "name": "editOutsourcing", "type": "e",
  1182. "parammaps": {
  1183. "bigId": "@insertSpotList.LastInsertId",
  1184. "providerId": "@insertSpotList.providerId",
  1185. "amount": amount,
  1186. "eqId": "@insertSpotList.eqId",
  1187. "eqCode": "@insertSpotList.eqCode",
  1188. "eqName": "@insertSpotList.eqName",
  1189. "typea": "@insertSpotList.typea",
  1190. "date": "@insertSpotList.date",
  1191. "contractId": "@insertSpotList.contractId",
  1192. "id": "@insertSpotList.id",
  1193. "providerName": "@insertSpotList.providerName",
  1194. "contractCode": "@insertSpotList.contractCode"
  1195. }
  1196. }
  1197. ]
  1198. },
  1199. {
  1200. "name": "updateBigoutsourcingFlowCompeleted", "type": "e",
  1201. "parammaps":{
  1202. id:this.createTemp.id
  1203. }
  1204. },
  1205. ]
  1206. }
  1207. ExecDataByConfig(send_data).then(response => {
  1208. console.log('新增保存发送参数', send_data)
  1209. if (response.msg === 'fail') {
  1210. this.$notify({
  1211. title: '保存失败',
  1212. message: response.data,
  1213. type: 'warning',
  1214. duration: 2000
  1215. })
  1216. } else {
  1217. this.dialogFormVisible = false
  1218. this.get_table_data1()
  1219. this.$notify({
  1220. title: '',
  1221. message: '保存成功',
  1222. type: 'success',
  1223. duration: 2000
  1224. })
  1225. }
  1226. })
  1227. },
  1228. form_delete(row) {
  1229. console.log('点击了删除',row)
  1230. MessageBox.confirm('确认删除此条信息?', {
  1231. confirmButtonText: '确认',
  1232. cancelButtonText: '取消',
  1233. type: 'warning'
  1234. }).then(() => {
  1235. var send_data = {
  1236. "common": { "returnmap": "0" },
  1237. "data": [
  1238. {
  1239. "name": "deleteBigoutsourcing", "type": "e",
  1240. "parammaps": { "id":row.id }
  1241. }
  1242. ]
  1243. }
  1244. ExecDataByConfig(send_data).then(response => {
  1245. this.get_table_data1()
  1246. this.$notify({
  1247. title: '成功',
  1248. message: '删除成功',
  1249. type: 'success',
  1250. duration: 2000
  1251. })
  1252. })
  1253. }).catch(() => {
  1254. this.$message({
  1255. type: 'info',
  1256. message: '已取消删除'
  1257. })
  1258. })
  1259. },
  1260. change_statue(val) {
  1261. if (val == 2) {
  1262. this.statueReason = true
  1263. } else {
  1264. this.statueReason = false
  1265. }
  1266. },
  1267. form_examine(row) {
  1268. console.log('点击了设备处长审核',row)
  1269. if (row == undefined) {
  1270. this.examineTemp = this.createTemp
  1271. this.$set(this.createTemp, 'status', 1)
  1272. this.$set(this.createTemp, 'workflowNote', '')
  1273. } else {
  1274. this.examineTemp = Object.assign({}, row)
  1275. this.$set(this.examineTemp, 'status', 1)
  1276. this.$set(this.examineTemp, 'workflowNote', '')
  1277. }
  1278. // this.dialogStatus = 'examine'
  1279. this.dialogStatus = 'check1'
  1280. this.dialogFormVisible_Examine = true
  1281. this.statueReason = false
  1282. },
  1283. form_examine_save() {
  1284. console.log('点击了设备处长审核', this.examineTemp)
  1285. this.isokDisable = true
  1286. setTimeout(() => {
  1287. this.isokDisable = false
  1288. }, 1000)
  1289. this.$refs['examineTemp'].validate(valid => {
  1290. if (valid) {
  1291. //不通过
  1292. if(this.statueReason){
  1293. this.examineTemp.status = 2
  1294. //审核角色
  1295. this.examineTemp.flowCompeleted = "3"
  1296. } else {
  1297. this.examineTemp.status = 0
  1298. this.examineTemp.flowCompeleted = "2"
  1299. }
  1300. this.examineTemp.empid = Cookies.get('employeid')
  1301. var send_data = {
  1302. "common": { "returnmap": "0" },
  1303. "data": [
  1304. // {
  1305. // "name": "editBigoutsourcingEquipment", "type": "e",
  1306. // "parammaps": this.examineTemp
  1307. // },
  1308. {
  1309. "name": "editBigoutsourcingDepartment", "type": "e",
  1310. "parammaps": this.examineTemp
  1311. }
  1312. ]
  1313. }
  1314. console.log(send_data,'审核1保存')
  1315. ExecDataByConfig(send_data).then(response => {
  1316. console.log('审核确认发送参数', send_data)
  1317. if (response.msg !== 'fail') {
  1318. this.get_table_data1()
  1319. this.dialogFormVisible_Examine = false
  1320. this.statueReason = false
  1321. this.$notify({
  1322. title: '成功',
  1323. message: '审核成功',
  1324. type: 'success',
  1325. duration: 2000
  1326. })
  1327. } else {
  1328. failproccess(response, this.$notify)
  1329. }
  1330. })
  1331. }
  1332. })
  1333. },
  1334. form_examine2(row) {
  1335. console.log('点击了场长审核',row)
  1336. this.examineTemp = Object.assign({}, row)
  1337. if (row == undefined) {
  1338. // this.examineTemp = this.createTemp
  1339. this.$set(this.createTemp, 'status', 1)
  1340. this.$set(this.createTemp, 'workflowNote', '')
  1341. } else {
  1342. this.$set(this.examineTemp, 'status', 1)
  1343. this.$set(this.examineTemp, 'workflowNote', '')
  1344. }
  1345. // this.dialogStatus = 'examine'
  1346. this.dialogStatus = 'check2'
  1347. this.statueReason = false
  1348. this.dialogFormVisible_Examine = true
  1349. // GetDataByName(this.getParmCreateNumber).then(response => {
  1350. // this.$nextTick(() => {
  1351. // console.log('新增单号', response.data.list[0].orderCode)
  1352. // this.examineTemp.acceptanceCode = response.data.list[0].orderCode
  1353. // this.$set(this.examineTemp,'acceptanceCode',response.data.list[0].orderCode)
  1354. // this.$forceUpdate()
  1355. // })
  1356. // })
  1357. },
  1358. add_dialog_saveSave2() {
  1359. console.log(this.examineTemp,'=====---hss')
  1360. // this.examineTemp.iscontract =
  1361. //牧场
  1362. var mydata = {
  1363. // acceptanceCode:this.createTemp.acceptanceCode,
  1364. pastureId: this.createTemp.pastureId,
  1365. departmentId: this.createTemp.departmentId,
  1366. applicant:Cookies.get('employeid'),
  1367. outsourcingCode:this.examineTemp.outsourcingCode,
  1368. applyType:0,
  1369. date:parseTime(new Date(), '{y}-{m}-{d}'),
  1370. status:1
  1371. }
  1372. if(this.examineTemp.contract == 0){
  1373. mydata.iscontract = 1
  1374. }else{
  1375. mydata.iscontract = 0
  1376. }
  1377. var send_data = {
  1378. "common": { "returnmap": "0" },
  1379. "data": [
  1380. {
  1381. "name": "insertBigacceptance",
  1382. "type": "e",
  1383. "parammaps": mydata
  1384. }
  1385. ]
  1386. }
  1387. ExecDataByConfig(send_data).then(response => {
  1388. console.log('新增保存发送参数', send_data)
  1389. if (response.msg === 'fail') {
  1390. this.$notify({
  1391. title: '保存失败',
  1392. message: response.data,
  1393. type: 'warning',
  1394. duration: 2000
  1395. })
  1396. } else {
  1397. // this.$notify({
  1398. // title: '',
  1399. // message: '保存成功',
  1400. // type: 'success',
  1401. // duration: 2000
  1402. // })
  1403. }
  1404. })
  1405. },
  1406. form_examine_save2() {
  1407. console.log('点击了场长审核', this.examineTemp)
  1408. this.isokDisable = true
  1409. setTimeout(() => {
  1410. this.isokDisable = false
  1411. }, 1000)
  1412. // this.examineTemp.acceptanceCode = this.createTemp.acceptanceCode
  1413. this.$refs['examineTemp'].validate(valid => {
  1414. if (valid) {
  1415. //不通过
  1416. if(this.statueReason){
  1417. this.examineTemp.status = 2
  1418. //审核角色
  1419. this.examineTemp.flowCompeleted = "5"
  1420. } else {
  1421. // //总价大于等于10000 有高级设备工程师审核
  1422. // if(this.examineTemp.isAudit == 1){
  1423. // this.examineTemp.status = 0
  1424. // //总价小于10000 没有高级设备工程师,直接场长审核
  1425. // } else {
  1426. // this.examineTemp.status = 1
  1427. // }
  1428. this.examineTemp.status = 0
  1429. this.examineTemp.flowCompeleted = "4"
  1430. }
  1431. this.examineTemp.empid = Cookies.get('employeid')
  1432. var send_data = {
  1433. "common": { "returnmap": "0" },
  1434. "data": [
  1435. // {
  1436. // "name": "editBigoutsourcingField", "type": "e",
  1437. // "parammaps": this.examineTemp
  1438. // },
  1439. {
  1440. "name": "editBigoutsourcingEquipment", "type": "e",
  1441. "parammaps": this.examineTemp
  1442. }
  1443. ]
  1444. }
  1445. console.log(send_data,'审核2保存')
  1446. ExecDataByConfig(send_data).then(response => {
  1447. console.log('审核确认发送参数', send_data)
  1448. if (response.msg !== 'fail') {
  1449. if(this.examineTemp.status == 1){
  1450. this.add_dialog_saveSave2()
  1451. }
  1452. this.get_table_data1()
  1453. this.dialogFormVisible_Examine = false
  1454. this.statueReason = false
  1455. this.$notify({
  1456. title: '成功',
  1457. message: '审核成功',
  1458. type: 'success',
  1459. duration: 2000
  1460. })
  1461. } else {
  1462. failproccess(response, this.$notify)
  1463. }
  1464. })
  1465. }
  1466. })
  1467. },
  1468. form_examine3(row) {
  1469. console.log('点击了高级工程师 审核',row)
  1470. this.examineTemp = Object.assign({}, row)
  1471. if (row == undefined) {
  1472. //this.examineTemp = this.createTemp
  1473. this.$set(this.createTemp, 'status', 1)
  1474. this.$set(this.createTemp, 'workflowNote', '')
  1475. } else {
  1476. this.$set(this.examineTemp, 'status', 1)
  1477. this.$set(this.examineTemp, 'workflowNote', '')
  1478. }
  1479. // this.dialogStatus = 'examine'
  1480. this.dialogStatus = 'check3'
  1481. this.dialogFormVisible_Examine = true
  1482. this.statueReason = false
  1483. },
  1484. form_examine_save3() {
  1485. console.log('点击了高级工程师审核',this.examineTemp )
  1486. this.isokDisable = true
  1487. setTimeout(() => {
  1488. this.isokDisable = false
  1489. }, 1000)
  1490. this.$refs['examineTemp'].validate(valid => {
  1491. if (valid) {
  1492. //不通过
  1493. if(this.statueReason){
  1494. this.examineTemp.status = 2
  1495. //审核角色
  1496. this.examineTemp.flowCompeleted = "7"
  1497. } else {
  1498. //总价大于等于10000 有高级设备工程师审核
  1499. if(this.examineTemp.isAudit == 1){
  1500. this.examineTemp.status = 0
  1501. //总价小于10000 没有高级设备工程师,直接场长审核
  1502. } else {
  1503. this.examineTemp.status = 1
  1504. }
  1505. this.examineTemp.flowCompeleted = "6"
  1506. }
  1507. this.examineTemp.empid = Cookies.get('employeid')
  1508. var send_data = {
  1509. "common": { "returnmap": "0" },
  1510. "data": [
  1511. // {
  1512. // "name": "editBigoutsourcingAdvanceddate", "type": "e",
  1513. // "parammaps": this.examineTemp
  1514. // },
  1515. {
  1516. "name": "editBigoutsourcingField", "type": "e",
  1517. "parammaps": this.examineTemp
  1518. }
  1519. ]
  1520. }
  1521. console.log(send_data,'审核3保存',this.examineTemp)
  1522. ExecDataByConfig(send_data).then(response => {
  1523. console.log('审核确认发送参数', send_data)
  1524. if (response.msg !== 'fail') {
  1525. if(this.examineTemp.status == 1){
  1526. this.add_dialog_saveSave2()
  1527. }
  1528. this.get_table_data1()
  1529. this.dialogFormVisible_Examine = false
  1530. this.statueReason = false
  1531. this.$notify({
  1532. title: '成功',
  1533. message: '审核成功',
  1534. type: 'success',
  1535. duration: 2000
  1536. })
  1537. } else {
  1538. failproccess(response, this.$notify)
  1539. }
  1540. })
  1541. }
  1542. })
  1543. },
  1544. form_examine4(row) {
  1545. console.log('点击了高级工程师 审核',row)
  1546. this.examineTemp = Object.assign({}, row)
  1547. if (row == undefined) {
  1548. //this.examineTemp = this.createTemp
  1549. this.$set(this.createTemp, 'status', 1)
  1550. this.$set(this.createTemp, 'workflowNote', '')
  1551. } else {
  1552. this.$set(this.examineTemp, 'status', 1)
  1553. this.$set(this.examineTemp, 'workflowNote', '')
  1554. }
  1555. this.dialogStatus = 'examine'
  1556. this.dialogFormVisible_Examine = true
  1557. this.statueReason = false
  1558. },
  1559. form_examine_save4() {
  1560. console.log('点击了高级工程师审核',this.examineTemp )
  1561. this.isokDisable = true
  1562. setTimeout(() => {
  1563. this.isokDisable = false
  1564. }, 1000)
  1565. this.$refs['examineTemp'].validate(valid => {
  1566. if (valid) {
  1567. //不通过
  1568. if(this.statueReason){
  1569. this.examineTemp.status = 2
  1570. //审核角色
  1571. this.examineTemp.flowCompeleted = "9"
  1572. } else {
  1573. this.examineTemp.status = 1
  1574. this.examineTemp.flowCompeleted = "8"
  1575. }
  1576. this.examineTemp.empid = Cookies.get('employeid')
  1577. var send_data = {
  1578. "common": { "returnmap": "0" },
  1579. "data": [
  1580. // {
  1581. // "name": "editBigoutsourcingAdvanceddate", "type": "e",
  1582. // "parammaps": this.examineTemp
  1583. // },
  1584. {
  1585. "name": "editBigoutsourcingAdvanceddate", "type": "e",
  1586. "parammaps": this.examineTemp
  1587. }
  1588. ]
  1589. }
  1590. console.log(send_data,'审核4保存')
  1591. ExecDataByConfig(send_data).then(response => {
  1592. console.log('审核确认发送参数', send_data)
  1593. if (response.msg !== 'fail') {
  1594. if(this.examineTemp.status == 1){
  1595. this.add_dialog_saveSave2()
  1596. }
  1597. this.get_table_data1()
  1598. this.dialogFormVisible_Examine = false
  1599. this.statueReason = false
  1600. this.$notify({
  1601. title: '成功',
  1602. message: '审核成功',
  1603. type: 'success',
  1604. duration: 2000
  1605. })
  1606. } else {
  1607. failproccess(response, this.$notify)
  1608. }
  1609. })
  1610. }
  1611. })
  1612. },
  1613. }
  1614. }
  1615. </script>
  1616. <style lang="scss" scoped>
  1617. .select_up {
  1618. padding: 0 12px;
  1619. font-size: 14px;
  1620. position: absolute;
  1621. z-index: 99999;
  1622. background-color: white;
  1623. top: 0px;
  1624. width: 100%;
  1625. border-radius: 5px 5px 0 0;
  1626. ::v-deep .el-button {
  1627. color: #bcbcbc;
  1628. font-size: 14px;
  1629. i {
  1630. font-size: 14px;
  1631. }
  1632. }
  1633. ::v-deep .el-button:hover {
  1634. color: #409EFF;
  1635. }
  1636. .el-button+.el-button {
  1637. margin-left: 6px;
  1638. }
  1639. }
  1640. .select_list {
  1641. margin-top: 25px;
  1642. }
  1643. // .content{
  1644. // padding: 20px 20px;
  1645. // .title{
  1646. // text-align: center;
  1647. // font-weight: 700;
  1648. // }
  1649. // .title2{
  1650. // float: left;
  1651. // font-weight: 700;
  1652. // padding: 10px 0;
  1653. // }
  1654. // }
  1655. </style>