7cce6ff958df28fb88e791d72242236e13684133.svn-base 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504
  1. <template>
  2. <div class="app-container">
  3. <div class="search">
  4. <el-input v-model="table.getdataListParm.parammaps.fname" placeholder="饲料名称" style="width: 130px;" class="filter-item" clearable />
  5. <el-select v-model="table.getdataListParm.parammaps.fclassid" filterable placeholder="饲料类别" class="filter-item" style="width: 150px;" clearable>
  6. <el-option v-for="item in feedTypeList" :key="item.id" :label="item.mixname" :value="item.id" />
  7. </el-select>
  8. <el-select v-model="table.getdataListParm.parammaps.source" filterable placeholder="饲料来源" class="filter-item" style="width: 120px;" clearable>
  9. <el-option v-for="item in feedSourcesList" :key="item.id" :label="item.name" :value="item.id" />
  10. </el-select>
  11. <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="是否启用" class="filter-item" style="width: 120px;" clearable>
  12. <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
  13. </el-select>
  14. <div ref="selectInput" class="filter-item selectInput">
  15. <el-input type="text" name="" value="" placeholder="请点击选择搜索条件" class="Input" />
  16. <i v-if="arrowDown" icon="el-icon-arrow-down" class="el-icon-arrow-down" />
  17. <i v-if="arrowUp" icon="el-icon-arrow-up" class="el-icon-arrow-up" />
  18. <ul v-if="arrowUp" class="selectUl">
  19. <li><a>允许误差数</a><el-input v-model="table.getdataListParm.parammaps.allowratio"type="text" style="width: 245px;" /></li>
  20. <li><a>跳转重量域</a><el-input v-model="table.getdataListParm.parammaps.autozone" type="text" style="width: 245px;" /></li>
  21. <li>
  22. <a>跳转延时</a>
  23. <el-select v-model="table.getdataListParm.parammaps.autosecond" filterable placeholder="跳转延时" class="filter-item" style="width: 245px;" clearable>
  24. <el-option v-for="item in jumpDelayList" :key="item.value" :label="item.label" :value="item.value" />
  25. </el-select>
  26. </li>
  27. <li>
  28. <div style="float: right;">
  29. <el-button class="downminCancel" @click="arrowUp=false;arrowDown=true;">取消</el-button>
  30. <el-button class="miniPrimary" @click="handleSearch">搜索</el-button>
  31. </div>
  32. </li>
  33. </ul>
  34. </div>
  35. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  36. <el-button class="successBorder" @click="handleRefresh">重置</el-button>
  37. </div>
  38. <div class="operation">
  39. <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleCreate">新增</el-button>
  40. <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>
  41. <el-button class="success" icon="el-icon-receiving" @click="handleFeedBank">饲料库</el-button>
  42. </div>
  43. <div class="table">
  44. <el-table
  45. :key="table.tableKey"
  46. v-loading="table.listLoading"
  47. element-loading-text="给我一点时间"
  48. :data="table.list"
  49. border
  50. fit
  51. highlight-current-row
  52. style="width: 100%;"
  53. :row-style="rowStyle"
  54. :cell-style="cellStyle"
  55. class="elTable table-fixed"
  56. @selection-change="handleSelectionChange"
  57. >
  58. <el-table-column type="selection" align="center" width="50" fixed="left" />
  59. <el-table-column label="序号" align="center" type="index" width="50px" fixed="left">
  60. <template slot-scope="scope">
  61. <span>{{ scope.$index + (table.pageNum-1) * table.pageSize + 1 }}</span>
  62. </template>
  63. </el-table-column>
  64. <el-table-column label="饲料名称" min-width="80px" align="center" fixed="left">
  65. <template slot-scope="scope">
  66. <span>{{ scope.row.fname }}</span>
  67. </template>
  68. </el-table-column>
  69. <el-table-column label="饲料分类" min-width="80px" align="center" fixed="left">
  70. <template slot-scope="scope">
  71. <span>{{ scope.row.fclass }}</span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="唯一编码" min-width="80px" align="center">
  75. <template slot-scope="scope">
  76. <span>{{ scope.row.feedcode }}</span>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="饲料来源" min-width="80px" align="center">
  80. <template slot-scope="scope">
  81. <span>{{ scope.row.source }}</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="计划类型" min-width="90px" align="center">
  85. <template slot-scope="scope">
  86. <span>{{ scope.row.printgroup }}</span>
  87. </template>
  88. </el-table-column>
  89. <el-table-column v-if="isInforvalue" label="小料秤" min-width="90px" align="center">
  90. <template slot-scope="scope">
  91. <span>{{ scope.row.smtmrname }}</span>
  92. </template>
  93. </el-table-column>
  94. <el-table-column label="允许误差数(kg)" min-width="85px" align="center">
  95. <template slot-scope="scope">
  96. <span>{{ scope.row.allowratio }}</span>
  97. </template>
  98. </el-table-column>
  99. <el-table-column label="包装单位重量(kg)" min-width="80px" align="center">
  100. <template slot-scope="scope">
  101. <span>{{ scope.row.unitweight }}</span>
  102. </template>
  103. </el-table-column>
  104. <el-table-column label="单价" min-width="50px" align="center">
  105. <template slot-scope="scope">
  106. <span>{{ scope.row.uprice }}</span>
  107. </template>
  108. </el-table-column>
  109. <el-table-column label="跳转重量域(kg)" min-width="90px" align="center">
  110. <template slot-scope="scope">
  111. <span>{{ scope.row.autozone }}</span>
  112. </template>
  113. </el-table-column>
  114. <el-table-column label="跳转延时" min-width="80px" align="center">
  115. <template slot-scope="scope">
  116. <span>{{ scope.row.autosecondname }}</span>
  117. </template>
  118. </el-table-column>
  119. <el-table-column label="确认开始" min-width="80px" align="center">
  120. <template slot-scope="scope">
  121. <span>{{ scope.row.confirmstartname }}</span>
  122. </template>
  123. </el-table-column>
  124. <el-table-column label="继电器位置" min-width="60px" align="center">
  125. <template slot-scope="scope">
  126. <span>{{ scope.row.trgaddress }}</span>
  127. </template>
  128. </el-table-column>
  129. <el-table-column label="无上域" min-width="60px" align="center">
  130. <template slot-scope="scope">
  131. <span v-if="scope.row.jmp == 0">否</span>
  132. <span v-else>是</span>
  133. </template>
  134. </el-table-column>
  135. <el-table-column label="备用字段01" min-width="90px" align="center">
  136. <template slot-scope="scope">
  137. <span>{{ scope.row.backup1 }}</span>
  138. </template>
  139. </el-table-column>
  140. <el-table-column label="备用字段02" min-width="90px" align="center">
  141. <template slot-scope="scope">
  142. <span>{{ scope.row.backup2 }}</span>
  143. </template>
  144. </el-table-column>
  145. <el-table-column label="备用字段03" min-width="90px" align="center">
  146. <template slot-scope="scope">
  147. <span>{{ scope.row.backup3 }}</span>
  148. </template>
  149. </el-table-column>
  150. <el-table-column label="是否启用" min-width="80px" align="center">
  151. <template slot-scope="scope">
  152. <el-switch v-model="scope.row.enable" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
  153. </template>
  154. </el-table-column>
  155. <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
  156. <template slot-scope="{row}">
  157. <a class="correcting" @click="handleNutritive (row)">营养价值</a>
  158. <span class="centerSpan">|</span>
  159. <a v-if="isRoleEdit" class="correcting" @click="handleRelation(row)">关联</a>
  160. <span v-if="isRoleEdit" class="centerSpan">|</span>
  161. <el-button v-if="isRoleEdit" icon="el-icon-edit-outline" class="miniSuccess" @click="handleUpdate(row)" />
  162. <span v-if="isRoleEdit" class="centerSpan">|</span>
  163. <el-button v-if="isRoleEdit" icon="el-icon-delete" class="miniDanger" @click="handleRowDelete(row)" />
  164. </template>
  165. </el-table-column>
  166. </el-table>
  167. <pagination v-show="table.total>=0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" />
  168. </div>
  169. <!-- 新增/编辑 -->
  170. <el-dialog :fullscreen="dialogFull" :visible.sync="create.dialogFormVisible" :close-on-click-modal="false" width="90%">
  171. <template slot="title">
  172. <div class="avue-crud__dialog__header">
  173. <span class="el-dialog__title">
  174. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  175. {{ textMap[create.dialogStatus] }}
  176. </span>
  177. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  178. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  179. <svg-icon v-else icon-class="fullscreen" />
  180. </div>
  181. </div>
  182. </template>
  183. <div class="app-add">
  184. <el-form ref="temp" :rules="create.rules" :model="create.temp" label-position="right" label-width="155px" style="width: 100%;margin:0 auto 50px">
  185. <el-row>
  186. <el-col :span="24">
  187. <h3 style="width: 160px;text-align: right;">基础信息</h3>
  188. </el-col>
  189. </el-row>
  190. <el-row>
  191. <el-col :span="6">
  192. <el-form-item label="饲料名称:" prop="fname">
  193. <el-input ref="fname" v-model="create.temp.fname" class="filter-item" placeholder="请输入饲料名称" type="textarea" :autosize="{ minRows:1}" maxlength="32" />
  194. </el-form-item>
  195. </el-col>
  196. <el-col :span="6">
  197. <el-form-item label="饲料类别:" prop="fclassid">
  198. <el-select v-model="create.temp.fclassid" filterable placeholder="饲料类别" class="filter-item" style="width: 100%;" @change="changeFeedList">
  199. <el-option v-for="item in feedTypeList" :key="item.id" :label="item.mixname" :value="item.id" />
  200. </el-select>
  201. </el-form-item></el-col>
  202. <el-col :span="6">
  203. <el-form-item label="唯一编码:" prop="feedcode">
  204. <el-input ref="feedcode" v-model="create.temp.feedcode" class="filter-item" placeholder="请输入唯一编码" type="text" />
  205. </el-form-item>
  206. </el-col>
  207. <el-col :span="6">
  208. <el-form-item label="饲料来源:" prop="source">
  209. <el-input ref="source" v-model="create.temp.source" class="filter-item" disabled placeholder="用户自定义" type="text" />
  210. </el-form-item>
  211. </el-col>
  212. </el-row>
  213. <el-row>
  214. <el-col :span="6">
  215. <el-form-item label="计划类型:" prop="printgroupid">
  216. <el-select v-model="create.temp.printgroupid" filterable placeholder="计划类型" class="filter-item" style="width: 100%;" @change="changePlanList">
  217. <el-option v-for="item in planTypeList" :key="item.value" :label="item.label" :value="item.value" />
  218. </el-select>
  219. </el-form-item>
  220. </el-col>
  221. <el-col :span="6">
  222. <el-form-item label="包装单位重量(kg):" prop="unitweight">
  223. <el-input ref="unitweight" v-model="create.temp.unitweight" class="filter-item" placeholder="正整数" type="number" style="width: 100%;" />
  224. </el-form-item>
  225. </el-col>
  226. <el-col :span="6">
  227. <el-form-item label="单价:" prop="uprice">
  228. <el-input ref="uprice" v-model="create.temp.uprice" v-limit class="filter-item" placeholder="最多俩位小数" type="number" step="0.01" style="width: 100%;" />
  229. </el-form-item>
  230. </el-col>
  231. </el-row>
  232. <el-row>
  233. <el-col :span="24">
  234. <h3 style="width: 160px;text-align: right;">搅拌参数</h3>
  235. </el-col>
  236. </el-row>
  237. <el-row>
  238. <el-col :span="6">
  239. <el-form-item label="允许误差数(kg):" prop="allowratio">
  240. <el-input ref="allowratio" v-model="create.temp.allowratio" class="filter-item" placeholder="正整数" type="text" />
  241. </el-form-item>
  242. </el-col>
  243. <el-col :span="6">
  244. <el-form-item label="跳转重量域(kg):" prop="autozone">
  245. <el-input ref="autozone" v-model="create.temp.autozone" :disabled="create.temp.autosecond=='0'" class="filter-item" placeholder="0-50之间的整数" type="text" />
  246. </el-form-item>
  247. </el-col>
  248. <el-col :span="6">
  249. <el-form-item label="跳转延时:" prop="autosecond">
  250. <el-select v-model="create.temp.autosecond" filterable placeholder="跳转延时" class="filter-item" style="width: 100%;" @change="changeAutosecond">
  251. <el-option v-for="item in jumpDelayList" :key="item.value" :label="item.label" :value="item.value" />
  252. </el-select>
  253. </el-form-item>
  254. </el-col>
  255. <el-col :span="6">
  256. <el-form-item label="确认开始:" prop="confirmstart">
  257. <el-select v-model="create.temp.confirmstart" filterabler placeholde="确认开始" class="filter-item" style="width: 100%;" @change="changeConfirmstart">
  258. <el-option v-for="item in confirmStartList" :key="item.id" :label="item.name" :value="item.id" />
  259. </el-select>
  260. </el-form-item>
  261. </el-col>
  262. </el-row>
  263. <el-row>
  264. <el-col :span="6">
  265. <el-form-item label="是否启用:" prop="enable">
  266. <el-select v-model="create.temp.enable" filterable placeholder="是否启用" class="filter-item" style="width: 100%;">
  267. <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
  268. </el-select>
  269. </el-form-item>
  270. </el-col>
  271. <el-col :span="6">
  272. <el-form-item label="继电器位置:" prop="trgaddress">
  273. <el-input ref="trgaddress" v-model="create.temp.trgaddress" class="filter-item" placeholder="继电器位置" type="number" />
  274. </el-form-item>
  275. </el-col>
  276. <el-col v-if="isInforvalue" :span="6">
  277. <el-form-item label="小料秤:" prop="smtmrid">
  278. <el-select v-model="create.temp.smtmrid" filterable placeholder="小料秤" clearable class="filter-item" style="width: 100%;" @change="changeSmallMaterial">
  279. <el-option v-for="item in smallMaterialList" :key="item.id" :label="item.tname" :value="item.id" />
  280. </el-select>
  281. </el-form-item>
  282. </el-col>
  283. <el-col :span="6">
  284. <el-form-item label="无上域:" prop="jmp">
  285. <el-select v-model="create.temp.jmp" placeholder="无上域" class="filter-item" style="width: 100%;" @change="changeSmallMaterial">
  286. <el-option v-for="item in jmpList" :key="item.id" :label="item.name" :value="item.id" />
  287. </el-select>
  288. </el-form-item>
  289. </el-col>
  290. </el-row>
  291. <el-row>
  292. <h3 style="width: 160px;text-align: right;">备用字段</h3>
  293. </el-row>
  294. <el-row>
  295. <el-col :span="6">
  296. <el-form-item label="备用字段01:" prop="backup1">
  297. <el-input ref="backup1" v-model="create.temp.backup1" class="filter-item" placeholder="备用字段01" type="text" />
  298. </el-form-item>
  299. </el-col>
  300. <el-col :span="6">
  301. <el-form-item label="备用字段02:" prop="backup2">
  302. <el-input ref="backup2" v-model="create.temp.backup2" class="filter-item" placeholder="备用字段02" type="text" />
  303. </el-form-item>
  304. </el-col>
  305. <el-col :span="6">
  306. <el-form-item label="备用字段03:" prop="backup3">
  307. <el-input ref="backup3" v-model="create.temp.backup3" class="filter-item" placeholder="备用字段03" type="text" />
  308. </el-form-item>
  309. </el-col>
  310. </el-row>
  311. </el-form>
  312. <div slot="footer" class="dialog-footer">
  313. <el-button class="cancelClose" @click="create.dialogFormVisible = false;getList()">关闭</el-button>
  314. <el-button v-if="create.dialogStatus==='create' || create.dialogStatus==='update'" class="save" :disabled="isokDisable" @click="create.dialogStatus==='create'?createData():updateData()">确认</el-button>
  315. </div>
  316. </div>
  317. </el-dialog>
  318. <!-- 饲料库 -->
  319. <el-dialog :fullscreen="dialogFull" :visible.sync="feedBank.dialogFormVisible" :close-on-click-modal="false" width="90%">
  320. <template slot="title">
  321. <div class="avue-crud__dialog__header">
  322. <span class="el-dialog__title">
  323. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  324. {{ textMap[feedBank.dialogStatus] }}
  325. </span>
  326. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  327. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  328. <svg-icon v-else icon-class="fullscreen" />
  329. </div>
  330. </div>
  331. </template>
  332. <div class="app-add">
  333. <div class="search">
  334. <el-input v-model="feedBank.getdataListParm.parammaps.fname" placeholder="饲料名称" style="width: 130px;" class="filter-item" clearable />
  335. <el-select v-model="feedBank.getdataListParm.parammaps.statue" filterabler placeholder="关联状态" class="filter-item" style="width: 120px;" clearable>
  336. <el-option v-for="item in associationStatusList" :key="item.id" :label="item.name" :value="item.id" />
  337. </el-select>
  338. <el-button class="successBorder" @click="handleFeedBankSearch">查询</el-button>
  339. <el-button class="successBorder" @click="handleFeedBankRefresh">重置</el-button>
  340. </div>
  341. <div class="table">
  342. <el-table
  343. :key="feedBank.tableKey"
  344. v-loading="feedBank.listLoading"
  345. element-loading-text="给我一点时间"
  346. :data="feedBank.list"
  347. border
  348. fit
  349. highlight-current-row
  350. style="width: 100%;margin: 0 auto 50px;"
  351. :row-style="rowStyle"
  352. :cell-style="cellStyle"
  353. class="elTable table-fixed"
  354. >
  355. <el-table-column label="序号" align="center" type="index" width="50px" />
  356. <el-table-column label="来源" min-width="50" align="center">
  357. <template slot-scope="scope">
  358. <span>{{ scope.row.sources }}</span>
  359. </template>
  360. </el-table-column>
  361. <el-table-column label="中国饲料号" min-width="70px" align="center">
  362. <template slot-scope="scope">
  363. <span>{{ scope.row.feedcode }}</span>
  364. </template>
  365. </el-table-column>
  366. <el-table-column label="饲料名称" min-width="80px" align="center">
  367. <template slot-scope="scope">
  368. <span>{{ scope.row.fname }}</span>
  369. </template>
  370. </el-table-column>
  371. <el-table-column label="价格" min-width="50px" align="center">
  372. <template slot-scope="scope">
  373. <span>{{ scope.row.price }}</span>
  374. </template>
  375. </el-table-column>
  376. <el-table-column label="样品说明" min-width="50px" align="center">
  377. <template slot-scope="scope">
  378. <span>{{ scope.row.remark }}</span>
  379. </template>
  380. </el-table-column>
  381. <el-table-column label="干物质(DM%)" min-width="65px" align="center">
  382. <template slot-scope="scope">
  383. <span>{{ scope.row.dry }}</span>
  384. </template>
  385. </el-table-column>
  386. <el-table-column label="淀粉(%DM)" min-width="59px" align="center">
  387. <template slot-scope="scope">
  388. <span>{{ scope.row.starch }}</span>
  389. </template>
  390. </el-table-column>
  391. <el-table-column label="粗蛋白(CP%DM)" min-width="70px" align="center">
  392. <template slot-scope="scope">
  393. <span>{{ scope.row.cp }}</span>
  394. </template>
  395. </el-table-column>
  396. <el-table-column label="钙(Ca%DM)" min-width="85px" align="center">
  397. <template slot-scope="scope">
  398. <span>{{ scope.row.ca }}</span>
  399. </template>
  400. </el-table-column>
  401. <el-table-column label="磷(P%DM)" min-width="85px" align="center">
  402. <template slot-scope="scope">
  403. <span>{{ scope.row.p }}</span>
  404. </template>
  405. </el-table-column>
  406. <el-table-column label="产奶净能(%DM)" min-width="75px" align="center">
  407. <template slot-scope="scope">
  408. <span>{{ scope.row.n }}</span>
  409. </template>
  410. </el-table-column>
  411. <el-table-column label="脂肪(%DM)" min-width="59px" align="center">
  412. <template slot-scope="scope">
  413. <span>{{ scope.row.fat }}</span>
  414. </template>
  415. </el-table-column>
  416. <el-table-column label="ADF(%DM)" min-width="60px" align="center">
  417. <template slot-scope="scope">
  418. <span>{{ scope.row.adf }}</span>
  419. </template>
  420. </el-table-column>
  421. <el-table-column label="NDF(%DM)" min-width="60px" align="center">
  422. <template slot-scope="scope">
  423. <span>{{ scope.row.ndf }}</span>
  424. </template>
  425. </el-table-column>
  426. <el-table-column label="NDIP%" min-width="70px" align="center">
  427. <template slot-scope="scope">
  428. <span>{{ scope.row.ndip }}</span>
  429. </template>
  430. </el-table-column>
  431. <el-table-column label="粗灰分(Ash%)" min-width="65px" align="center">
  432. <template slot-scope="scope">
  433. <span>{{ scope.row.ash }}</span>
  434. </template>
  435. </el-table-column>
  436. <el-table-column label="粗料" min-width="50px" align="center">
  437. <template slot-scope="scope">
  438. <span>{{ scope.row.iscu }}</span>
  439. </template>
  440. </el-table-column>
  441. <el-table-column label="关联状态" min-width="50px" align="center">
  442. <template slot-scope="scope">
  443. <span v-if="scope.row.statue==0">否</span>
  444. <span v-if="scope.row.statue==1">是</span>
  445. </template>
  446. </el-table-column>
  447. </el-table>
  448. </div>
  449. <div slot="footer" class="dialog-footer">
  450. <el-button class="cancelClose cancelClose1" @click="feedBank.dialogFormVisible = false; ">关闭</el-button>
  451. </div>
  452. </div>
  453. </el-dialog>
  454. <!-- 关联 -->
  455. <el-dialog :fullscreen="dialogFull" :visible.sync="relation.dialogFormVisible" :close-on-click-modal="false" width="90%">
  456. <template slot="title">
  457. <div class="avue-crud__dialog__header">
  458. <span class="el-dialog__title">
  459. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  460. {{ textMap[relation.dialogStatus] }}
  461. </span>
  462. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  463. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  464. <svg-icon v-else icon-class="fullscreen" />
  465. </div>
  466. </div>
  467. </template>
  468. <div class="app-add">
  469. <div class="search">
  470. <el-input v-model="relation.getdataListParm.parammaps.fname" placeholder="饲料名称" style="width: 130px;" class="filter-item" clearable />
  471. <el-button class="successBorder" @click="handleRelationSearch">查询</el-button>
  472. </div>
  473. <div class="table">
  474. <el-table
  475. :key="relation.tableKey"
  476. v-loading="relation.listLoading"
  477. element-loading-text="给我一点时间"
  478. :data="relation.list"
  479. border
  480. fit
  481. highlight-current-row
  482. style="width: 100%;margin: 0 auto 50px;"
  483. :row-style="rowStyle"
  484. :cell-style="cellStyle"
  485. class="elTable table-fixed"
  486. >
  487. <el-table-column label="序号" align="center" type="index" width="50px" />
  488. <el-table-column label="来源" min-width="50" align="center">
  489. <template slot-scope="scope">
  490. <span>{{ scope.row.sources }}</span>
  491. </template>
  492. </el-table-column>
  493. <el-table-column label="中国饲料号" min-width="80px" align="center">
  494. <template slot-scope="scope">
  495. <span>{{ scope.row.feedcode }}</span>
  496. </template>
  497. </el-table-column>
  498. <el-table-column label="饲料名称" min-width="80px" align="center">
  499. <template slot-scope="scope">
  500. <span>{{ scope.row.fname }}</span>
  501. </template>
  502. </el-table-column>
  503. <el-table-column label="价格" min-width="50px" align="center">
  504. <template slot-scope="scope">
  505. <span>{{ scope.row.price }}</span>
  506. </template>
  507. </el-table-column>
  508. <el-table-column label="样品说明" min-width="50px" align="center">
  509. <template slot-scope="scope">
  510. <span>{{ scope.row.remark }}</span>
  511. </template>
  512. </el-table-column>
  513. <el-table-column label="干物质(DM%)" min-width="65px" align="center">
  514. <template slot-scope="scope">
  515. <span>{{ scope.row.dry }}</span>
  516. </template>
  517. </el-table-column>
  518. <el-table-column label="淀粉(%DM)" min-width="59px" align="center">
  519. <template slot-scope="scope">
  520. <span>{{ scope.row.starch }}</span>
  521. </template>
  522. </el-table-column>
  523. <el-table-column label="粗蛋白(CP%DM)" min-width="75px" align="center">
  524. <template slot-scope="scope">
  525. <span>{{ scope.row.cp }}</span>
  526. </template>
  527. </el-table-column>
  528. <el-table-column label="钙(Ca%DM)" min-width="83px" align="center">
  529. <template slot-scope="scope">
  530. <span>{{ scope.row.ca }}</span>
  531. </template>
  532. </el-table-column>
  533. <el-table-column label="磷(P%DM)" min-width="80px" align="center">
  534. <template slot-scope="scope">
  535. <span>{{ scope.row.p }}</span>
  536. </template>
  537. </el-table-column>
  538. <el-table-column label="产奶净能(%DM)" min-width="75px" align="center">
  539. <template slot-scope="scope">
  540. <span>{{ scope.row.n }}</span>
  541. </template>
  542. </el-table-column>
  543. <el-table-column label="脂肪(%DM)" min-width="59px" align="center">
  544. <template slot-scope="scope">
  545. <span>{{ scope.row.fat }}</span>
  546. </template>
  547. </el-table-column>
  548. <el-table-column label="ADF(%DM)" min-width="60px" align="center">
  549. <template slot-scope="scope">
  550. <span>{{ scope.row.adf }}</span>
  551. </template>
  552. </el-table-column>
  553. <el-table-column label="NDF(%DM)" min-width="60px" align="center">
  554. <template slot-scope="scope">
  555. <span>{{ scope.row.ndf }}</span>
  556. </template>
  557. </el-table-column>
  558. <el-table-column label="NDIP%" min-width="70px" align="center">
  559. <template slot-scope="scope">
  560. <span>{{ scope.row.ndip }}</span>
  561. </template>
  562. </el-table-column>
  563. <el-table-column label="粗灰分(Ash%)" min-width="65px" align="center">
  564. <template slot-scope="scope">
  565. <span>{{ scope.row.ash }}</span>
  566. </template>
  567. </el-table-column>
  568. <el-table-column label="粗料" min-width="50px" align="center">
  569. <template slot-scope="scope">
  570. <span>{{ scope.row.iscu }}</span>
  571. </template>
  572. </el-table-column>
  573. <el-table-column label="操作" min-width="50px" align="center" class-name="small-padding fixed-width" fixed="right">
  574. <template slot-scope="{row}">
  575. <a v-if="row.statueRelation == '1'" class="correcting" :disabled="isokDisable" @click="disassociateData(row)">取消关联</a>
  576. <a v-if="row.statueRelation == '0'" class="correcting" :disabled="isokDisable" @click="relationData(row)">关联</a>
  577. </template>
  578. </el-table-column>
  579. </el-table>
  580. </div>
  581. <div slot="footer" class="dialog-footer">
  582. <el-button class="cancelClose cancelClose1" @click="relation.dialogFormVisible = false;getList() ">关闭</el-button>
  583. </div>
  584. </div>
  585. </el-dialog>
  586. <!-- 营养价值 -->
  587. <el-dialog :fullscreen="dialogFull" :visible.sync="nutritive.dialogFormVisible" :close-on-click-modal="false" width="90%">
  588. <template slot="title">
  589. <div class="avue-crud__dialog__header">
  590. <span class="el-dialog__title">
  591. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  592. {{ textMap[nutritive.dialogStatus] }}
  593. </span>
  594. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  595. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  596. <svg-icon v-else icon-class="fullscreen" />
  597. </div>
  598. </div>
  599. </template>
  600. <div class="app-add">
  601. <el-form ref="temp" :rules="nutritive.rules" :model="nutritive.temp" label-position="right" label-width="160px" style="width: 100%;margin:0 auto 50px">
  602. <el-row>
  603. <el-col :span="6">
  604. <el-form-item label="干物质(DM%):" prop="dry">
  605. <el-input ref="dry" v-model="nutritive.temp.dry" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入干物质" type="number" step="0.01" />
  606. </el-form-item>
  607. </el-col>
  608. <el-col :span="6">
  609. <el-form-item label="淀粉(%DM):" prop="starch">
  610. <el-input ref="starch" v-model="nutritive.temp.starch" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入淀粉" type="number" step="0.01" />
  611. </el-form-item>
  612. </el-col>
  613. <el-col :span="6">
  614. <el-form-item label="粗蛋白(CP%DM):" prop="cp">
  615. <el-input ref="cp" v-model="nutritive.temp.cp" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入粗蛋白" type="number" step="0.01" />
  616. </el-form-item>
  617. </el-col>
  618. <el-col :span="6">
  619. <el-form-item label="钙(Ca%DM):" prop="ca">
  620. <el-input ref="ca" v-model="nutritive.temp.ca" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入钙" type="number" step="0.01" />
  621. </el-form-item>
  622. </el-col>
  623. </el-row>
  624. <el-row>
  625. <el-col :span="6">
  626. <el-form-item label="磷(P%DM):" prop="p">
  627. <el-input ref="p" v-model="nutritive.temp.p" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入磷" type="number" step="0.01" />
  628. </el-form-item>
  629. </el-col>
  630. <el-col :span="6">
  631. <el-form-item label="产奶净能(%DM):" prop="n">
  632. <el-input ref="n" v-model="nutritive.temp.n" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入产奶净能" type="number" step="0.01" />
  633. </el-form-item>
  634. </el-col>
  635. <el-col :span="6">
  636. <el-form-item label="脂肪(%DM):" prop="fat">
  637. <el-input ref="fat" v-model="nutritive.temp.fat" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入脂肪" type="number" step="0.01" />
  638. </el-form-item>
  639. </el-col>
  640. <el-col :span="6">
  641. <el-form-item label="ADF(%DM):" prop="adf">
  642. <el-input ref="adf" v-model="nutritive.temp.adf" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入ADF" type="number" step="0.01" />
  643. </el-form-item>
  644. </el-col>
  645. </el-row>
  646. <el-row>
  647. <el-col :span="6">
  648. <el-form-item label="NDF(%DM):" prop="ndf">
  649. <el-input ref="ndf" v-model="nutritive.temp.ndf" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入NDF" type="number" step="0.01" />
  650. </el-form-item>
  651. </el-col>
  652. <el-col :span="6">
  653. <el-form-item label="NDIP(%):" prop="ndip">
  654. <el-input ref="ndip" v-model="nutritive.temp.ndip" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入NDIP" type="number" step="0.01" />
  655. </el-form-item>
  656. </el-col>
  657. <el-col :span="6">
  658. <el-form-item label="粗灰分(Ash%):" prop="ash">
  659. <el-input ref="ash" v-model="nutritive.temp.ash" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入粗灰分" type="number" min="0.00" step="0.01" />
  660. </el-form-item>
  661. </el-col>
  662. </el-row>
  663. </el-form>
  664. <div slot="footer" class="dialog-footer">
  665. <el-button class="cancelClose" @click="nutritive.dialogFormVisible = false;getList()">关闭</el-button>
  666. <el-button v-if="nutritive.dialogStatus==='nutritive' && isRoleEdit" class="save" :disabled="isokDisable" @click="nutritiveData()">确认</el-button>
  667. </div>
  668. </div>
  669. </el-dialog>
  670. </div>
  671. </template>
  672. <script>
  673. import { GetDataByName, PostDataByName, failproccess, ExecDataByConfig, GetDataByNames, checkButtons } from '@/api/common'
  674. import Cookies from 'js-cookie'
  675. import Pagination from '@/components/Pagination'
  676. import { MessageBox } from 'element-ui'
  677. export default {
  678. name: 'FeedTable',
  679. components: { Pagination },
  680. directives: {
  681. limit: {
  682. // 指令的定义
  683. update: function(el) {
  684. el.onkeypress = function(e) {
  685. var code = e.charCode
  686. if (code != 0) {
  687. if (!String.fromCharCode(code).match(/[0-9\.]/)) {
  688. return false
  689. }
  690. }
  691. }
  692. el.addEventListener('textInput', function(e) {
  693. e.target.value = e.target.value.replace(/[^0-9\.]/g, '')
  694. })
  695. el.onkeyup = function(e) {
  696. e.target.value = e.target.value.replace(/[^0-9\.]/g, '')
  697. }
  698. }
  699. }
  700. },
  701. data() {
  702. return {
  703. dialogFull: false,
  704. isInforvalue: false,
  705. isRoleEdit: [],
  706. requestParams: [
  707. { name: 'getDictByName', offset: 0, pagecount: 0, params: ['跳转延时'] },
  708. { name: 'getFeedclassByBig', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
  709. { name: 'getDictByName2', offset: 0, pagecount: 0, params: ['计划类型'] },
  710. { name: 'getTMRListEnableTypeFeed', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid'), eqtype: '4' }}
  711. ],
  712. requestParams2: {
  713. name: 'getSysoptEnable', offset: 0, parammaps: { pastureid: Cookies.get('pastureid'), inforname: 'isSmallMaterial' }
  714. },
  715. enableList: [{ id: '1', name: '是' }, { id: '0', name: '否' }], // 是否启用
  716. feedSourcesList: [{ id: '0', name: '系统内置' }, { id: '1', name: '用户自定义' }], // 饲料来源
  717. confirmStartList: [{ id: '0', name: '禁用' }, { id: '1', name: '启用' }], // 确认开始
  718. associationStatusList: [{ id: '1', name: '是' }, { id: '0', name: '否' }], // 关联状态
  719. jumpDelayList: [], // 跳转延时
  720. feedTypeList: [], // 饲料分类
  721. planTypeList: [], // 计划类型
  722. smallMaterialList: [], // 小料秤
  723. jmpList: [{ id: '0', name: '否' }, { id: '1', name: '是' }], // 无上域
  724. table: {
  725. tableKey: 0,
  726. list: [],
  727. total: 0,
  728. listLoading: true,
  729. getdataListParm: {
  730. name: 'getFeedList',
  731. page: 1,
  732. offset: 1,
  733. pagecount: parseInt(Cookies.get('pageCount')),
  734. returntype: 'Map',
  735. parammaps: {
  736. pastureid: Cookies.get('pastureid'),
  737. fname: '',
  738. fclassid: '',
  739. source: '',
  740. autozone: '',
  741. autosecond: '',
  742. allowratio: '',
  743. printgroup: '',
  744. enable: ''
  745. }
  746. }
  747. },
  748. // 多项搜索显示隐藏
  749. arrowDown: true,
  750. arrowUp: false,
  751. // 新增/编辑
  752. create: {
  753. dialogFormVisible: false,
  754. dialogStatus: '',
  755. temp: { pastureid: Cookies.get('pastureid'), fname: '', fclassid: '', fclass: '', feedcode: '', source: '用户自定义', printgroupid: '1', printgroup: '无', unitweight: '', uprice: '', allowratio: '', autozone: '', autosecond: '0', autosecondname: '禁用', confirmstart: '0', confirmstartname: '禁用', enable: '1', trgaddress: '', backup1: '', backup2: '', backup3: '' },
  756. rules: {
  757. fname: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
  758. fclassid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
  759. feedcode: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }]
  760. }
  761. },
  762. // 饲料库
  763. feedBank: {
  764. dialogFormVisible: false,
  765. dialogStatus: '',
  766. temp: {},
  767. rules: {},
  768. tableKey: 0,
  769. list: [],
  770. total: 0,
  771. listLoading: true,
  772. getdataListParm: {
  773. name: 'getFeednurList',
  774. page: 1,
  775. offset: 1,
  776. returntype: 'Map',
  777. parammaps: {
  778. pastureid: Cookies.get('pastureid'),
  779. fname: '',
  780. statue: ''
  781. }
  782. }
  783. },
  784. // 关联
  785. relation: {
  786. dialogFormVisible: false,
  787. dialogStatus: '',
  788. temp: {},
  789. rules: {},
  790. tableKey: 0,
  791. list: [],
  792. total: 0,
  793. listLoading: true,
  794. getdataListParm: {
  795. name: 'getFeednurRelation',
  796. page: 1,
  797. offset: 1,
  798. returntype: 'Map',
  799. parammaps: {
  800. pastureid: Cookies.get('pastureid'),
  801. fname: ''
  802. }
  803. }
  804. },
  805. // 营养价值
  806. nutritive: {
  807. dialogFormVisible: false,
  808. dialogStatus: '',
  809. temp: {},
  810. rules: {}
  811. },
  812. textMap: {
  813. create: '新增',
  814. update: '编辑',
  815. feedBank: '饲料库',
  816. relation: '关联',
  817. nutritive: '营养价值'
  818. },
  819. isokDisable: false,
  820. selectList: [],
  821. requestParam: {},
  822. rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
  823. cellStyle: { padding: 0 + 'px' }
  824. }
  825. },
  826. mounted() {
  827. document.addEventListener('click', (e) => {
  828. if (this.$refs.selectInput !== undefined) {
  829. if (!this.$refs.selectInput.contains(e.target)) {
  830. this.arrowDown = true
  831. this.arrowUp = false
  832. } else {
  833. this.arrowDown = false
  834. this.arrowUp = true
  835. }
  836. }
  837. })
  838. },
  839. created() {
  840. this.getList()
  841. this.getDownList()
  842. this.getButtons()
  843. this.getInforvalueList()
  844. },
  845. methods: {
  846. getButtons() {
  847. const Edit = 'FeedTable'
  848. const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
  849. this.isRoleEdit = isRoleEdit
  850. },
  851. getInforvalueList() {
  852. GetDataByName(this.requestParams2).then(response => {
  853. if (response.data !== null) {
  854. if (response.data.list[0].inforvalue == 0) {
  855. this.isInforvalue = false
  856. } else {
  857. this.isInforvalue = true
  858. }
  859. } else {
  860. this.isInforvalue = false
  861. }
  862. })
  863. },
  864. getDownList() {
  865. GetDataByNames(this.requestParams).then(response => {
  866. this.jumpDelayList = response.data.getDictByName.list
  867. this.feedTypeList = response.data.getFeedclassByBig.list
  868. this.planTypeList = response.data.getDictByName2.list
  869. this.smallMaterialList = response.data.getTMRListEnableTypeFeed.list
  870. })
  871. },
  872. getList() {
  873. this.table.listLoading = true
  874. GetDataByName(this.table.getdataListParm).then(response => {
  875. console.log('table数据', response.data.list)
  876. if (response.data.list !== null) {
  877. this.table.list = response.data.list
  878. this.table.pageNum = response.data.pageNum
  879. this.table.pageSize = response.data.pageSize
  880. this.table.total = response.data.total
  881. } else {
  882. this.table.list = []
  883. }
  884. setTimeout(() => {
  885. this.table.listLoading = false
  886. }, 100)
  887. })
  888. },
  889. handleSearch() {
  890. console.log('点击了查询')
  891. this.table.getdataListParm.offset = 1
  892. this.getList()
  893. this.arrowDown = true
  894. this.arrowUp = false
  895. },
  896. handleRefresh() {
  897. console.log('点击了重置')
  898. this.table.getdataListParm.parammaps.fname = ''
  899. this.table.getdataListParm.parammaps.fclassid = ''
  900. this.table.getdataListParm.parammaps.source = ''
  901. this.table.getdataListParm.parammaps.autozone = ''
  902. this.table.getdataListParm.parammaps.autosecond = ''
  903. this.table.getdataListParm.parammaps.allowratio = ''
  904. this.table.getdataListParm.parammaps.printgroup = ''
  905. this.table.getdataListParm.parammaps.enable = ''
  906. this.table.getdataListParm.offset = 1
  907. this.getList()
  908. },
  909. resetTemp() {
  910. this.create.temp = { pastureid: Cookies.get('pastureid'), fname: '', fclassid: '', fclass: '', feedcode: '', source: '用户自定义', printgroupid: '1', printgroup: '无', unitweight: '', uprice: '', allowratio: '', autozone: '', autosecond: '0', autosecondname: '禁用', confirmstart: '0', confirmstartname: '禁用', enable: '1', trgaddress: '', backup1: '', backup2: '', backup3: '', jmp: '0' }
  911. },
  912. // 计划类型
  913. changePlanList(item) {
  914. console.log(item,'======')
  915. this.create.temp.printgroup = this.planTypeList.find(obj => obj.value === item).label
  916. },
  917. // 饲料类型
  918. changeFeedList(item) {
  919. this.create.temp.fclass = this.feedTypeList.find(obj => obj.id === item).mixname
  920. },
  921. // 跳转延时
  922. changeAutosecond(item) {
  923. this.create.temp.autosecondname = this.jumpDelayList.find(obj => obj.value === item).label
  924. },
  925. // 确认开始
  926. changeConfirmstart(item) {
  927. this.create.temp.confirmstartname = this.confirmStartList.find(obj => obj.id === item).name
  928. },
  929. changeSmallMaterial(item) {
  930. if (item !== '') {
  931. this.create.temp.smtmrname = this.smallMaterialList.find(obj => obj.id === item).tname
  932. } else {
  933. this.create.temp.smtmrname = ''
  934. }
  935. },
  936. // 新增
  937. handleCreate() {
  938. console.log('点击了新增')
  939. this.resetTemp()
  940. this.dialogFull = false
  941. this.create.dialogStatus = 'create'
  942. this.create.dialogFormVisible = true
  943. },
  944. createData() {
  945. console.log('点击了新增保存')
  946. this.isokDisable = true
  947. setTimeout(() => {
  948. this.isokDisable = false
  949. }, 1000)
  950. this.$refs['temp'].validate(valid => {
  951. if (valid) {
  952. const unitweight = /^[1-9]\d*$/
  953. if (this.create.temp.unitweight !== '') {
  954. if (!unitweight.test(parseFloat(this.create.temp.unitweight))) {
  955. this.$message({ type: 'error', message: '包装单位重量请输入正整数', duration: 2000 })
  956. return false
  957. }
  958. }
  959. const uprice = /^\d+(\.\d{1,2})?$/
  960. if (this.create.temp.uprice !== '') {
  961. if (!uprice.test(parseFloat(this.create.temp.uprice))) {
  962. this.$message({ type: 'error', message: '单价请保留两位小数', duration: 2000 })
  963. return false
  964. }
  965. }
  966. if (this.create.temp.autozone !== '') {
  967. const autozone = /^([0-9]|(1[0-9]|2[0-9]|3[0-9]|4[0-9]|(50)))$/
  968. if (!autozone.test(parseFloat(this.create.temp.autozone))) {
  969. this.$message({ type: 'error', message: '跳转重量域请输入大于等于0小于等于50的整数', duration: 2000 })
  970. return false
  971. }
  972. } else {
  973. this.create.temp.autozone = '0'
  974. }
  975. if (this.create.temp.trgaddress.length > 8) {
  976. this.$message({ type: 'error', message: '继电器位置请输入1-8位数字', duration: 2000 })
  977. return false
  978. }
  979. const allowratio = /^[0-9]\d*$/
  980. if (this.create.temp.allowratio !== '') {
  981. if (!allowratio.test(parseFloat(this.create.temp.allowratio))) {
  982. this.$message({ type: 'error', message: '允许误差数请输入大于等于0的整数', duration: 2000 })
  983. return false
  984. }
  985. }
  986. this.isokDisable = true
  987. setTimeout(() => {
  988. this.isokDisable = false
  989. }, 1000)
  990. this.requestParam.name = 'insertFeed'
  991. this.requestParam.parammaps = this.create.temp
  992. if (this.create.temp.allowratio == '') { this.create.temp.allowratio = '0' }
  993. if (this.create.temp.uprice == '') { this.create.temp.uprice = '0' }
  994. if (this.create.temp.unitweight == '') { this.create.temp.unitweight = '0' }
  995. if (this.create.temp.autozone == '') { this.create.temp.autozone = '0' }
  996. if (this.create.temp.trgaddress == '') { this.create.temp.trgaddress = '0' }
  997. PostDataByName(this.requestParam).then(response => {
  998. console.log('新增保存发送参数', this.requestParam)
  999. if (response.msg !== 'fail') {
  1000. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1001. this.create.dialogFormVisible = false
  1002. this.getList()
  1003. } else {
  1004. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1005. if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
  1006. if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
  1007. if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
  1008. if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
  1009. if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
  1010. }
  1011. })
  1012. }
  1013. })
  1014. },
  1015. // 编辑
  1016. handleUpdate(row) {
  1017. console.log('点击了编辑', row)
  1018. this.create.dialogStatus = 'update'
  1019. this.dialogFull = false
  1020. this.create.dialogFormVisible = true
  1021. row.fclassid = String(row.fclassid)
  1022. row.printgroupid = String(row.printgroupid)
  1023. row.autosecond = String(row.autosecond)
  1024. row.confirmstart = String(row.confirmstart)
  1025. row.enable = String(row.enable)
  1026. row.jmp = String(row.jmp)
  1027. if (row.printgroupid !== '') {
  1028. row.printgroup = this.planTypeList.find(obj => obj.value == row.printgroupid).label
  1029. }
  1030. this.create.temp = Object.assign({}, row)
  1031. if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
  1032. if (this.create.temp.uprice == '0.00') { this.create.temp.uprice = '' }
  1033. if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
  1034. if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
  1035. if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
  1036. if (this.create.temp.smtmrid == '-1') { this.create.temp.smtmrid = '' }
  1037. console.log(row,'=====')
  1038. },
  1039. updateData() {
  1040. console.log('点击了编辑保存')
  1041. this.isokDisable = true
  1042. setTimeout(() => {
  1043. this.isokDisable = false
  1044. }, 1000)
  1045. this.$refs['temp'].validate(valid => {
  1046. if (valid) {
  1047. const unitweight = /^[1-9]\d*$/
  1048. if (this.create.temp.unitweight !== '') {
  1049. if (!unitweight.test(parseFloat(this.create.temp.unitweight))) {
  1050. this.$message({ type: 'error', message: '包装单位重量请输入正整数', duration: 2000 })
  1051. return false
  1052. }
  1053. }
  1054. const uprice = /^\d+(\.\d{1,2})?$/
  1055. if (this.create.temp.uprice !== '') {
  1056. if (!uprice.test(parseFloat(this.create.temp.uprice))) {
  1057. this.$message({ type: 'error', message: '单价请保留两位小数', duration: 2000 })
  1058. return false
  1059. }
  1060. }
  1061. if (this.create.temp.autozone !== '') {
  1062. const autozone = /^([0-9]|(1[0-9]|2[0-9]|3[0-9]|4[0-9]|(50)))$/
  1063. if (!autozone.test(parseFloat(this.create.temp.autozone))) {
  1064. this.$message({ type: 'error', message: '跳转重量域请输入大于等于0小于等于50的整数', duration: 2000 })
  1065. return false
  1066. }
  1067. } else {
  1068. this.create.temp.autozone = '0'
  1069. }
  1070. if (this.create.temp.trgaddress.length > 8) {
  1071. this.$message({ type: 'error', message: '继电器位置请输入1-8位数字', duration: 2000 })
  1072. return false
  1073. }
  1074. const allowratio = /^[0-9]\d*$/
  1075. if (this.create.temp.allowratio !== '') {
  1076. if (!allowratio.test(parseFloat(this.create.temp.allowratio))) {
  1077. this.$message({ type: 'error', message: '允许误差数请输入大于等于0的整数', duration: 2000 })
  1078. return false
  1079. }
  1080. }
  1081. this.isokDisable = true
  1082. setTimeout(() => {
  1083. this.isokDisable = false
  1084. }, 1000)
  1085. this.requestParam.name = 'updateFeed'
  1086. this.requestParam.parammaps = this.create.temp
  1087. if (this.create.temp.allowratio == '') { this.create.temp.allowratio = '0' }
  1088. if (this.create.temp.uprice == '') { this.create.temp.uprice = '0' }
  1089. if (this.create.temp.unitweight == '') { this.create.temp.unitweight = '0' }
  1090. if (this.create.temp.autozone == '') { this.create.temp.autozone = '0' }
  1091. if (this.create.temp.trgaddress == '') { this.create.temp.trgaddress = '0' }
  1092. PostDataByName(this.requestParam).then(response => {
  1093. console.log('新增保存发送参数', this.requestParam)
  1094. if (response.msg !== 'fail') {
  1095. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1096. this.create.dialogFormVisible = false
  1097. this.getList()
  1098. } else {
  1099. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1100. if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
  1101. if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
  1102. if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
  1103. if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
  1104. if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
  1105. }
  1106. })
  1107. }
  1108. })
  1109. },
  1110. // 饲料库
  1111. handleFeedBank() {
  1112. console.log('点击了饲料库')
  1113. this.dialogFull = false
  1114. this.feedBank.dialogStatus = 'feedBank'
  1115. this.feedBank.dialogFormVisible = true
  1116. this.getFeedBankList()
  1117. },
  1118. getFeedBankList() {
  1119. this.feedBank.listLoading = true
  1120. GetDataByName(this.feedBank.getdataListParm).then(response => {
  1121. console.log('table数据', response.data.list)
  1122. if (response.data.list !== null) {
  1123. this.feedBank.list = response.data.list
  1124. this.feedBank.pageNum = response.data.pageNum
  1125. this.feedBank.pageSize = response.data.pageSize
  1126. this.feedBank.total = response.data.total
  1127. } else {
  1128. this.feedBank.list = []
  1129. }
  1130. setTimeout(() => {
  1131. this.feedBank.listLoading = false
  1132. }, 100)
  1133. })
  1134. },
  1135. handleFeedBankSearch() {
  1136. console.log('点击了饲料库搜索')
  1137. this.getFeedBankList()
  1138. this.feedBank.getdataListParm.offset = 1
  1139. },
  1140. handleFeedBankRefresh() {
  1141. console.log('点击了饲料库重置')
  1142. this.feedBank.getdataListParm.parammaps.fname = ''
  1143. this.feedBank.getdataListParm.parammaps.statue = ''
  1144. this.getFeedBankList()
  1145. },
  1146. // 关联
  1147. handleRelation(row) {
  1148. console.log('点击了关联')
  1149. this.dialogFull = false
  1150. this.relation.dialogStatus = 'relation'
  1151. this.relation.dialogFormVisible = true
  1152. this.relation.temp = Object.assign({}, row)
  1153. this.relation.getdataListParm.parammaps.fid = this.relation.temp.id
  1154. this.getRelationList()
  1155. },
  1156. getRelationList() {
  1157. this.relation.listLoading = true
  1158. GetDataByName(this.relation.getdataListParm).then(response => {
  1159. console.log('table数据', response.data.list)
  1160. if (response.data.list !== null) {
  1161. this.relation.list = response.data.list
  1162. this.relation.pageNum = response.data.pageNum
  1163. this.relation.pageSize = response.data.pageSize
  1164. this.relation.total = response.data.total
  1165. } else {
  1166. this.relation.list = []
  1167. }
  1168. setTimeout(() => {
  1169. this.relation.listLoading = false
  1170. }, 100)
  1171. })
  1172. },
  1173. handleRelationSearch() {
  1174. console.log('点击了关联搜索')
  1175. this.relation.getdataListParm.offset = 1
  1176. this.getRelationList()
  1177. },
  1178. disassociateData(row) {
  1179. console.log('点击了取消关联')
  1180. MessageBox.confirm('是否确认取消关联?', {
  1181. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1182. }).then(() => {
  1183. this.isokDisable = true
  1184. setTimeout(() => {
  1185. this.isokDisable = false
  1186. }, 1000)
  1187. this.requestParam.name = 'updateFeedrelation'
  1188. this.requestParam.parammaps = {}
  1189. this.requestParam.parammaps.pastureid = this.relation.temp.pastureid
  1190. this.requestParam.parammaps.fid = this.relation.temp.id
  1191. this.requestParam.parammaps.id = row.id
  1192. PostDataByName(this.requestParam).then(response => {
  1193. console.log('取消关联保存发送参数', this.requestParam)
  1194. if (response.msg !== 'fail') {
  1195. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1196. this.getRelationList()
  1197. this.getList()
  1198. } else {
  1199. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1200. }
  1201. })
  1202. }).catch(() => {
  1203. this.$message({ type: 'info', message: '已取消' })
  1204. })
  1205. },
  1206. relationData(row) {
  1207. console.log('点击了关联保存')
  1208. MessageBox.confirm('是否确认关联?', {
  1209. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1210. }).then(() => {
  1211. this.isokDisable = true
  1212. setTimeout(() => {
  1213. this.isokDisable = false
  1214. }, 1000)
  1215. this.requestParam.name = 'insertFeednur'
  1216. this.requestParam.parammaps = {}
  1217. this.requestParam.parammaps.pastureid = this.relation.temp.pastureid
  1218. this.requestParam.parammaps.fid = this.relation.temp.id
  1219. this.requestParam.parammaps.fname = this.relation.temp.fname
  1220. this.requestParam.parammaps.feedcode = this.relation.temp.feedcode
  1221. this.requestParam.parammaps.price = row.price
  1222. this.requestParam.parammaps.remark = row.remark
  1223. this.requestParam.parammaps.dry = row.dry
  1224. this.requestParam.parammaps.starch = row.starch
  1225. this.requestParam.parammaps.cp = row.cp
  1226. this.requestParam.parammaps.ca = row.ca
  1227. this.requestParam.parammaps.p = row.p
  1228. this.requestParam.parammaps.n = row.n
  1229. this.requestParam.parammaps.fat = row.fat
  1230. this.requestParam.parammaps.adf = row.adf
  1231. this.requestParam.parammaps.ndf = row.ndf
  1232. this.requestParam.parammaps.ndip = row.ndip
  1233. this.requestParam.parammaps.ash = row.ash
  1234. this.requestParam.parammaps.fpercent = row.fpercent
  1235. this.requestParam.parammaps.iscu = row.iscu
  1236. this.requestParam.parammaps.feednurid = row.id
  1237. PostDataByName(this.requestParam).then(response => {
  1238. console.log('关联保存发送参数', this.requestParam)
  1239. if (response.msg !== 'fail') {
  1240. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1241. this.getRelationList()
  1242. this.getList()
  1243. } else {
  1244. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1245. }
  1246. })
  1247. }).catch(() => {
  1248. this.$message({ type: 'info', message: '已取消' })
  1249. })
  1250. },
  1251. // 营养价值
  1252. handleNutritive(row) {
  1253. console.log('点击了营养价值', row)
  1254. this.dialogFull = false
  1255. this.nutritive.dialogStatus = 'nutritive'
  1256. this.nutritive.dialogFormVisible = true
  1257. this.nutritive.temp = Object.assign({}, row)
  1258. },
  1259. nutritiveData() {
  1260. console.log('点击了营养价值保存')
  1261. this.isokDisable = true
  1262. setTimeout(() => {
  1263. this.isokDisable = false
  1264. }, 1000)
  1265. if (this.nutritive.temp.dry == undefined) { this.$set(this.nutritive.temp, 'dry', '') }
  1266. if (this.nutritive.temp.starch == undefined) { this.$set(this.nutritive.temp, 'starch', '') }
  1267. if (this.nutritive.temp.cp == undefined) { this.$set(this.nutritive.temp, 'cp', '') }
  1268. if (this.nutritive.temp.ca == undefined) { this.$set(this.nutritive.temp, 'ca', '') }
  1269. if (this.nutritive.temp.p == undefined) { this.$set(this.nutritive.temp, 'p', '') }
  1270. if (this.nutritive.temp.n == undefined) { this.$set(this.nutritive.temp, 'n', '') }
  1271. if (this.nutritive.temp.fat == undefined) { this.$set(this.nutritive.temp, 'fat', '') }
  1272. if (this.nutritive.temp.adf == undefined) { this.$set(this.nutritive.temp, 'adf', '') }
  1273. if (this.nutritive.temp.ndf == undefined) { this.$set(this.nutritive.temp, 'ndf', '') }
  1274. if (this.nutritive.temp.ndip == undefined) { this.$set(this.nutritive.temp, 'ndip', '') }
  1275. if (this.nutritive.temp.ash == undefined) { this.$set(this.nutritive.temp, 'ash', '') }
  1276. var positiveNumber = /^\d+(\.\d{1,2})?$/
  1277. if (this.nutritive.temp.dry !== '') {
  1278. if (!positiveNumber.test(parseFloat(this.nutritive.temp.dry))) {
  1279. this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
  1280. return false
  1281. }
  1282. }
  1283. console.log(this.nutritive.temp.starch)
  1284. if (this.nutritive.temp.starch !== '') {
  1285. if (!positiveNumber.test(parseFloat(this.nutritive.temp.starch))) {
  1286. this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
  1287. return false
  1288. }
  1289. }
  1290. if (this.nutritive.temp.cp !== '') {
  1291. if (!positiveNumber.test(parseFloat(this.nutritive.temp.cp))) {
  1292. this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
  1293. return false
  1294. }
  1295. }
  1296. if (this.nutritive.temp.ca !== '') {
  1297. if (!positiveNumber.test(parseFloat(this.nutritive.temp.ca))) {
  1298. this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
  1299. return false
  1300. }
  1301. }
  1302. if (this.nutritive.temp.p !== '') {
  1303. if (!positiveNumber.test(parseFloat(this.nutritive.temp.p))) {
  1304. this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
  1305. return false
  1306. }
  1307. }
  1308. if (this.nutritive.temp.n !== '') {
  1309. if (!positiveNumber.test(parseFloat(this.nutritive.temp.n))) {
  1310. this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
  1311. return false
  1312. }
  1313. }
  1314. if (this.nutritive.temp.fat !== '') {
  1315. if (!positiveNumber.test(parseFloat(this.nutritive.temp.fat))) {
  1316. this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
  1317. return false
  1318. }
  1319. }
  1320. if (this.nutritive.temp.adf !== '') {
  1321. if (!positiveNumber.test(parseFloat(this.nutritive.temp.adf))) {
  1322. this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
  1323. return false
  1324. }
  1325. }
  1326. if (this.nutritive.temp.ndf !== '') {
  1327. if (!positiveNumber.test(parseFloat(this.nutritive.temp.ndf))) {
  1328. this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
  1329. return false
  1330. }
  1331. }
  1332. if (this.nutritive.temp.ndip !== '') {
  1333. if (!positiveNumber.test(parseFloat(this.nutritive.temp.ndip))) {
  1334. this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
  1335. return false
  1336. }
  1337. }
  1338. if (this.nutritive.temp.ash !== '') {
  1339. if (!positiveNumber.test(parseFloat(this.nutritive.temp.ash))) {
  1340. this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
  1341. return false
  1342. }
  1343. }
  1344. this.requestParam.name = 'insertFeednur'
  1345. this.requestParam.parammaps = {}
  1346. this.requestParam.parammaps.pastureid = this.nutritive.temp.pastureid
  1347. this.requestParam.parammaps.fid = this.nutritive.temp.id
  1348. this.requestParam.parammaps.fname = this.nutritive.temp.fname
  1349. this.requestParam.parammaps.feedcode = this.nutritive.temp.feedcode
  1350. this.requestParam.parammaps.price = this.nutritive.temp.uprice
  1351. this.requestParam.parammaps.remark = this.nutritive.temp.remark
  1352. this.requestParam.parammaps.dry = this.nutritive.temp.dry
  1353. this.requestParam.parammaps.starch = this.nutritive.temp.starch
  1354. this.requestParam.parammaps.cp = this.nutritive.temp.cp
  1355. this.requestParam.parammaps.ca = this.nutritive.temp.ca
  1356. this.requestParam.parammaps.p = this.nutritive.temp.p
  1357. this.requestParam.parammaps.n = this.nutritive.temp.n
  1358. this.requestParam.parammaps.fat = this.nutritive.temp.fat
  1359. this.requestParam.parammaps.adf = this.nutritive.temp.adf
  1360. this.requestParam.parammaps.ndf = this.nutritive.temp.ndf
  1361. this.requestParam.parammaps.ndip = this.nutritive.temp.ndip
  1362. this.requestParam.parammaps.ash = this.nutritive.temp.ash
  1363. this.requestParam.parammaps.fpercent = this.nutritive.temp.fpercent
  1364. this.requestParam.parammaps.iscu = this.nutritive.temp.iscu
  1365. this.requestParam.parammaps.feednurid = '-1'
  1366. PostDataByName(this.requestParam).then(response => {
  1367. console.log('关联保存发送参数', this.requestParam)
  1368. if (response.msg !== 'fail') {
  1369. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1370. this.getList()
  1371. this.nutritive.dialogFormVisible = false
  1372. } else {
  1373. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1374. }
  1375. })
  1376. },
  1377. // 行内删除
  1378. handleRowDelete(row) {
  1379. console.log('点击了行内删除')
  1380. MessageBox.confirm('是否确认删除此信息?', {
  1381. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1382. }).then(() => {
  1383. this.selectList = []
  1384. this.requestParam = {}
  1385. this.requestParam.common = { 'returnmap': '0' }
  1386. this.requestParam.data = []
  1387. this.requestParam.data[0] = { 'name': 'checkDeleteFeed', 'type': 'v', 'parammaps': {
  1388. 'pastureid': row.pastureid,
  1389. 'id': row.id
  1390. }}
  1391. this.requestParam.data[1] = { 'name': 'deleteFeed', 'type': 'e', 'parammaps': {
  1392. 'pastureid': row.pastureid,
  1393. 'id': row.id
  1394. }}
  1395. ExecDataByConfig(this.requestParam).then(response => {
  1396. console.log('删除保存发送参数', this.requestParam)
  1397. if (response.msg === 'fail') {
  1398. this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
  1399. } else {
  1400. this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
  1401. this.getList()
  1402. }
  1403. })
  1404. }).catch(() => {
  1405. this.$message({ type: 'info', message: '已取消删除' })
  1406. })
  1407. },
  1408. handleSelectionChange(val) {
  1409. console.log('勾选数据', val)
  1410. this.selectList = val
  1411. },
  1412. // 多项删除
  1413. handleDelete() {
  1414. console.log('点击了删除')
  1415. if (this.selectList.length == 0) {
  1416. this.$message({ type: 'error', message: '请选择饲料表信息', duration: 2000 })
  1417. } else {
  1418. MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否删除?', {
  1419. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1420. }).then(() => {
  1421. this.requestParam = {}
  1422. this.requestParam.common = { 'returnmap': '0' }
  1423. this.requestParam.data = []
  1424. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  1425. this.requestParam.data[0].children = []
  1426. this.requestParam.data[0].children[0] = { 'name': 'checkDeleteFeed', 'type': 'v', 'parammaps': {
  1427. id: '@insertSpotList.id',
  1428. pastureid: '@insertSpotList.pastureid'
  1429. }}
  1430. this.requestParam.data[0].children[1] = { 'name': 'deleteFeed', 'type': 'e', 'parammaps': {
  1431. id: '@insertSpotList.id',
  1432. pastureid: '@insertSpotList.pastureid'
  1433. }}
  1434. ExecDataByConfig(this.requestParam).then(response => {
  1435. console.log('删除保存发送参数', this.requestParam)
  1436. if (response.msg === 'fail') {
  1437. this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
  1438. } else {
  1439. this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
  1440. this.getList()
  1441. }
  1442. })
  1443. })
  1444. }
  1445. }
  1446. }
  1447. }
  1448. </script>
  1449. <style lang="scss" scoped>
  1450. .search{margin-top:10px;}
  1451. .table{margin-top:10px;}
  1452. $width:350px;
  1453. $left:325px;
  1454. .selectInput{
  1455. position: relative;
  1456. display: inline-block;
  1457. .Input{width: $width;position: relative;}
  1458. .el-icon-arrow-down{width: 30px;height: 30px;position: absolute;left: $left;top:10px;color:#C0C4CC;}
  1459. .el-icon-arrow-up{width: 30px;height: 30px;position: absolute;left: $left;top:10px;color:#C0C4CC;}
  1460. .selectUl{
  1461. z-index: 111;width: $width;background: #fff;border: 1px solid #E4E7ED;box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);margin: -1px 0 0 0;padding: 6px 0; margin: 0;box-sizing: border-box;position: absolute;
  1462. li{
  1463. list-style: none;font-size: 14px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #606266; height: 50px; line-height: 50px; box-sizing: border-box; cursor: pointer;
  1464. a{float:left;width: 80px;}
  1465. a:hover{color: rgba(0, 204, 102, 0.71); font-weight: 700;}
  1466. }
  1467. }
  1468. }
  1469. </style>