0e79c21539744713c38573c184a0290360e3aabb.svn-base 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001
  1. <template>
  2. <div class="app-container">
  3. <div class="operation">
  4. <el-button class="success" @click="handleCreate">新增入库单</el-button>
  5. <el-button class="success" @click="handleInitial">初始化库存</el-button>
  6. </div>
  7. <div class="search">
  8. <el-date-picker v-model="table.getdataListParm.parammaps.inputDatetime" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" />
  9. <el-button class="el-icon-arrow-left elIconArrowLeft" @click="handleBefore" />
  10. <el-button class="el-icon-arrow-right elIconArrowRight" @click="handleNext" />
  11. <el-select v-model="table.getdataListParm.parammaps.feedid" placeholder="饲料名称" class="filter-item" style="width: 150px;" clearable>
  12. <el-option v-for="item in feedNameList" :key="item.id" :label="item.fname" :value="item.id" />
  13. </el-select>
  14. <el-select v-model="table.getdataListParm.parammaps.providerid" placeholder="供应商" class="filter-item" style="width: 150px;" clearable>
  15. <el-option v-for="item in supplierList" :key="item.id" :label="item.providerName" :value="item.id" />
  16. </el-select>
  17. <el-select v-model="table.getdataListParm.parammaps.islaid" placeholder="是否入库" class="filter-item" style="width: 150px;" clearable>
  18. <el-option v-for="item in islaidList" :key="item.id" :label="item.name" :value="item.name" />
  19. </el-select>
  20. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  21. <el-button class="successBorder" @click="handleRefresh">重置</el-button>
  22. </div>
  23. <div class="table">
  24. <el-table
  25. :key="table.tableKey"
  26. v-loading="table.listLoading"
  27. element-loading-text="给我一点时间"
  28. :data="table.list"
  29. border
  30. fit
  31. highlight-current-row
  32. style="width: 100%;"
  33. :row-style="rowStyle"
  34. :cell-style="cellStyle"
  35. class="elTable table-fixed"
  36. >
  37. <el-table-column label="序号" align="center" type="index" width="50px">
  38. <template slot-scope="scope">
  39. <span>{{ scope.$index + (table.pageNum-1) * table.pageSize + 1 }}</span>
  40. </template>
  41. </el-table-column>
  42. <el-table-column label="入库日期" min-width="130px" align="center">
  43. <template slot-scope="scope">
  44. <span>{{ scope.row.laiddate }}</span>
  45. </template>
  46. </el-table-column>
  47. <el-table-column label="饲料名称" min-width="130px" align="center">
  48. <template slot-scope="scope">
  49. <span>{{ scope.row.feedname }}</span>
  50. </template>
  51. </el-table-column>
  52. <el-table-column label="供应商" min-width="130px" align="center">
  53. <template slot-scope="scope">
  54. <span>{{ scope.row.providername }}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="入库重量(kg)" min-width="110px" align="center">
  58. <template slot-scope="scope">
  59. <span>{{ scope.row.operateweight }}</span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column label="总价(元)" min-width="110px" align="center">
  63. <template slot-scope="scope">
  64. <span>{{ scope.row.sumprice }}</span>
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="批号" min-width="110px" align="center">
  68. <template slot-scope="scope">
  69. <span>{{ scope.row.pcpde }}</span>
  70. </template>
  71. </el-table-column>
  72. <el-table-column label="备注" min-width="110px" align="center">
  73. <template slot-scope="scope">
  74. <span>{{ scope.row.remark }}</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column label="是否入库" min-width="110px" align="center">
  78. <template slot-scope="scope">
  79. <span>{{ scope.row.islaid }}</span>
  80. </template>
  81. </el-table-column>
  82. <el-table-column label="创建人" min-width="110px" align="center">
  83. <template slot-scope="scope">
  84. <span>{{ scope.row.createemp }}</span>
  85. </template>
  86. </el-table-column>
  87. <el-table-column label="创建日期" min-width="110px" align="center">
  88. <template slot-scope="scope">
  89. <span>{{ scope.row.createdate }}</span>
  90. </template>
  91. </el-table-column>
  92. <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
  93. <template slot-scope="{row}">
  94. <el-button class="miniPrimary" @click="handleSee(row)">查看</el-button>
  95. <el-button v-if="row.islaid == '否'" class="miniSuccess" @click="handleUpdate(row)">编辑</el-button>
  96. </template>
  97. </el-table-column>
  98. </el-table>
  99. <pagination v-show="table.total>=0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" />
  100. </div>
  101. <!-- 新增入库单 -->
  102. <el-dialog :title="textMap[create.dialogStatus]" :visible.sync="create.dialogFormVisible" :close-on-click-modal="false" width="90%">
  103. <div class="app-add">
  104. <el-form ref="createTemp" :rules="create.rules" :model="create.createTemp" label-position="right" label-width="160px" style="width: 90%;margin:0 auto 50px">
  105. <el-row>
  106. <el-col :span="24">
  107. <h3 style="width: 160px;text-align: right;">基础信息</h3>
  108. </el-col>
  109. </el-row>
  110. <el-row>
  111. <el-col :span="8">
  112. <el-form-item label="入库日期:" prop="laiddate">
  113. <el-date-picker v-model="create.createTemp.laiddate" :disabled="create.dialogStatus=='see'" class="filter-item" type="date" placeholder="入库日期" :clearable="false" :picker-options="create.pickerOptions1" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
  114. </el-form-item>
  115. </el-col>
  116. <el-col :span="8">
  117. <el-form-item label="送货单编号:" prop="wagonnumber">
  118. <el-input ref="wagonnumber" v-model="create.createTemp.wagonnumber" :disabled="create.dialogStatus=='see'" class="filter-item" placeholder="送货单编号" type="text" />
  119. </el-form-item>
  120. </el-col>
  121. <el-col :span="8">
  122. <el-form-item label="饲料名称:" prop="feedname">
  123. <el-autocomplete
  124. v-model="create.createTemp.feedname"
  125. value-key="fname"
  126. class="inline-input"
  127. :fetch-suggestions="feedNameSearch"
  128. placeholder="请选择饲料名称"
  129. style="width:98%"
  130. :disabled="create.dialogStatus=='see' || create.dialogStatus=='update'"
  131. @select="handleSelectFeedName"
  132. @blur="blurFeedName"
  133. >
  134. <template slot-scope="{ item }">
  135. <span>{{ item.fname }}</span>
  136. </template>
  137. </el-autocomplete>
  138. </el-form-item>
  139. </el-col>
  140. </el-row>
  141. <el-row>
  142. <el-col :span="8">
  143. <el-form-item label="入库重量(kg):" prop="operateweight">
  144. <el-input ref="operateweight" v-model.trim="create.createTemp.operateweight" :disabled="create.dialogStatus=='see'" class="filter-item" placeholder="最多两位小数" type="number" :step="0.01" @blur="blurOperateweight" />
  145. </el-form-item>
  146. </el-col>
  147. <el-col :span="8">
  148. <el-form-item label="供应商:" prop="providerid">
  149. <el-select v-model="create.createTemp.providerid" clearable placeholder="请选择供应商" :disabled="create.dialogStatus=='see'" class="filter-item" style="width: 100%" @change="changeSupplier">
  150. <el-option v-for="item in supplierList" :key="item.id" :label="item.providerName" :value="item.id" />
  151. </el-select>
  152. </el-form-item>
  153. </el-col>
  154. <el-col :span="8">
  155. <el-form-item label="合同编号:" prop="contractcode">
  156. <el-select v-model="create.createTemp.contractcode" clearable placeholder="请选择合同编号" :disabled="create.dialogStatus=='see'" class="filter-item" style="width: 100%" @change="changeContractNo">
  157. <el-option v-for="item in contractNoList" :key="item.id" :label="item.contractcodeCat" :value="item.contractcode" />
  158. </el-select>
  159. </el-form-item>
  160. </el-col>
  161. </el-row>
  162. <el-row>
  163. <el-col :span="24">
  164. <h3 style="width: 160px;text-align: right;">价格信息</h3>
  165. </el-col>
  166. </el-row>
  167. <el-row>
  168. <el-col :span="8">
  169. <el-form-item label="单价(元):" prop="pricenew">
  170. <el-input ref="pricenew" v-model="create.createTemp.pricenew" :disabled="create.createTemp.contractcode !=='' || create.dialogStatus=='see'" class="filter-item" placeholder="最多两位小数" type="number" :step="0.01" @blur="blurPricenew" />
  171. </el-form-item>
  172. </el-col>
  173. <el-col :span="8">
  174. <el-form-item label="总价(元):" prop="sumprice">
  175. <el-input ref="sumprice" v-model="create.createTemp.sumprice" :disabled="create.dialogStatus=='see'" class="filter-item" placeholder="最多两位小数" type="number" :step="0.01" @blur="blurSumprice" />
  176. </el-form-item>
  177. </el-col>
  178. </el-row>
  179. <el-row>
  180. <el-col :span="24">
  181. <h3 style="width: 160px;text-align: right;">饲料信息</h3>
  182. </el-col>
  183. </el-row>
  184. <el-row>
  185. <el-col :span="8">
  186. <el-form-item label="毛重:" prop="grossweight">
  187. <el-input ref="grossweight" v-model.trim="create.createTemp.grossweight" :disabled="create.dialogStatus=='see'" class="filter-item" placeholder="最多两位小数" type="number" :step="0.01" @blur="blurGrossweight" />
  188. </el-form-item>
  189. </el-col>
  190. <el-col :span="8">
  191. <el-form-item label="皮重:" prop="tareweight">
  192. <el-input ref="tareweight" v-model.trim="create.createTemp.tareweight" :disabled="create.dialogStatus=='see'" class="filter-item" placeholder="最多两位小数" type="number" :step="0.01" @blur="blurTareweight" />
  193. </el-form-item>
  194. </el-col>
  195. <el-col :span="8">
  196. <el-form-item label="许可证号:" prop="licence">
  197. <el-input ref="licence" v-model="create.createTemp.licence" :disabled="create.dialogStatus=='see'" class="filter-item" placeholder="许可证号" type="text" />
  198. </el-form-item>
  199. </el-col>
  200. </el-row>
  201. <el-row>
  202. <el-col :span="8">
  203. <el-form-item label="批号:" prop="pcpde">
  204. <el-input ref="pcpde" v-model="create.createTemp.pcpde" :disabled="create.dialogStatus=='see'" class="filter-item" placeholder="批号" type="text" />
  205. </el-form-item>
  206. </el-col>
  207. </el-row>
  208. <el-row>
  209. <el-col :span="24">
  210. <h3 style="width: 160px;text-align: right;">操作信息</h3>
  211. </el-col>
  212. </el-row>
  213. <el-row>
  214. <el-col :span="8">
  215. <el-form-item label="创建人:" prop="createemp">
  216. <el-input ref="createemp" v-model="create.createTemp.createemp" class="filter-item" placeholder="创建人" type="text" disabled />
  217. </el-form-item>
  218. </el-col>
  219. <el-col :span="8">
  220. <el-form-item label="创建日期:" prop="createdate">
  221. <el-date-picker v-model="create.createTemp.createdate" class="filter-item" type="date" placeholder="创建日期" disabled />
  222. </el-form-item>
  223. </el-col>
  224. <el-col :span="8">
  225. <el-form-item label="备注:" prop="remark">
  226. <el-input ref="remark" v-model="create.createTemp.remark" :disabled="create.dialogStatus=='see'" class="filter-item" placeholder="1-255字符" type="text" />
  227. </el-form-item>
  228. </el-col>
  229. </el-row>
  230. </el-form>
  231. <div slot="footer" class="dialog-footer">
  232. <el-button class="cancelClose" @click="create.dialogFormVisible = false;getList(); ">关闭</el-button>
  233. <el-button v-if="create.dialogStatus !== 'see' " class="success" :disabled="isokDisable" @click="create.dialogStatus==='create'?createData():updateData()">确认</el-button>
  234. </div>
  235. </div>
  236. </el-dialog>
  237. <!-- 初始化库存 -->
  238. <el-dialog :title="textMap[initial.dialogStatus]" :visible.sync="initial.dialogFormVisible" :close-on-click-modal="false" width="80%" height="55%">
  239. <div class="app-add" style="height: 100%;margin: 0 auto 60px;">
  240. <div class="operation">
  241. <el-button style="float: left;margin-bottom:10px;" class="success" @click="handleInitialExport">模板下载</el-button>
  242. <el-upload style="float: left;margin-left: 10px;margin-bottom:10px;" action="" :auto-upload="false" accept=".xlsx, .xls" :show-file-list="false" :on-change="handleInitialImport">
  243. <el-button class="success">导入</el-button>
  244. </el-upload>
  245. </div>
  246. <div class="table">
  247. <el-table
  248. :key="initial.tableKey"
  249. v-loading="initial.listLoading"
  250. element-loading-text="给我一点时间"
  251. :data="initial.list"
  252. border
  253. fit
  254. highlight-current-row
  255. style="width: 100%;"
  256. :row-style="rowStyle"
  257. :cell-style="cellStyle"
  258. class="elTable table-fixed"
  259. >
  260. <el-table-column label="序号" align="center" type="index" width="50px" />
  261. <el-table-column label="饲料名称" min-width="130px" align="center">
  262. <template slot-scope="scope">
  263. <span>{{ scope.row.fname }}</span>
  264. </template>
  265. </el-table-column>
  266. <el-table-column label="库存重量" min-width="130px" align="center">
  267. <template slot-scope="scope">
  268. <el-input v-model="scope.row.stockweight" placeholder="最多两位小数" type="number" :step="0.01" style="width:95%;padding:10px 0;" />
  269. </template>
  270. </el-table-column>
  271. </el-table>
  272. <div slot="footer" class="dialog-footer">
  273. <el-button class="cancelClose" @click="initial.dialogFormVisible = false; ">关闭</el-button>
  274. <el-button class="success" :disabled="isokDisable" @click="initialData()">确认</el-button>
  275. </div>
  276. </div>
  277. </div></el-dialog>
  278. </div>
  279. </template>
  280. <script>
  281. import { GetDataByName, GetDataByNames, checkButtons, ExecDataByConfig, failproccess } from '@/api/common'
  282. import Pagination from '@/components/Pagination'
  283. import { MessageBox } from 'element-ui'
  284. import Cookies from 'js-cookie'
  285. import { json2excel, parseTime } from '@/utils/index.js'
  286. // import { getToken } from '@/utils/auth'
  287. import xlsx from 'xlsx'
  288. import { upload } from '@/utils/index.js'
  289. export default {
  290. name: 'Warehousing',
  291. components: { Pagination },
  292. data() {
  293. return {
  294. feedNameList: [], // 饲料名称
  295. feedNameAddList: [], // 饲料名称新增
  296. supplierList: [], // 供应商
  297. contractNoList: [], // 合同编号
  298. islaidList: [{ id: 0, name: '是' }, { id: 1, name: '否' }], // 是否入库
  299. requestParams: [
  300. { name: 'getFeedListEnable', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
  301. { name: 'getProviderListEnable', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }}
  302. ],
  303. table: {
  304. getdataListParm: {
  305. name: 'getFeedlaidList',
  306. page: 1,
  307. offset: 1,
  308. pagecount: 10,
  309. returntype: 'Map',
  310. parammaps: {
  311. pastureid: Cookies.get('pastureid'),
  312. inputDatetime: '',
  313. startTime: '',
  314. stopTime: '',
  315. feedid: '',
  316. islaid: '',
  317. providerid: ''
  318. }
  319. },
  320. tableKey: 0,
  321. list: [],
  322. total: 0,
  323. listLoading: true
  324. },
  325. create: {
  326. dialogFormVisible: false,
  327. dialogStatus: '',
  328. pickerOptions1: {
  329. disabledDate(time) {
  330. return time.getTime() > Date.now()// 当天之前的时间可选
  331. }
  332. },
  333. createTemp: {
  334. laiddate: '', feedid: '', feedname: '', operateweight: '', providerid: '', providername: '', startweight: '', priceold: '', contractcode: '', pricenew: '', sumprice: '', grossweight: '', tareweight: '', licence: '', pcpde: '', createemp: '', createdate: '', remark: '', 'wagonnumber': ''
  335. },
  336. rules: {
  337. laiddate: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
  338. feedname: [{ type: 'string', required: true, message: '必填', trigger: 'change' }],
  339. pricenew: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }]
  340. },
  341. getdataListParm: {
  342. name: 'getBigContractListEnable',
  343. offset: 0,
  344. pagecount: '',
  345. parammaps: { pastureid: Cookies.get('pastureid') }
  346. },
  347. getfeedNameParm: {
  348. name: 'getFeedListEnableV2',
  349. offset: 0,
  350. pagecount: '',
  351. parammaps: { pastureid: Cookies.get('pastureid') }
  352. }
  353. },
  354. initial: {
  355. dialogFormVisible: false,
  356. dialogStatus: '',
  357. rules: {},
  358. getdataListParm: {
  359. name: 'getinitFeed',
  360. page: 1,
  361. offset: 1,
  362. pagecount: 6,
  363. returntype: 'Map',
  364. parammaps: {
  365. pastureid: Cookies.get('pastureid')
  366. }
  367. },
  368. tableKey: 0,
  369. list: [],
  370. total: 0,
  371. listLoading: true,
  372. character: {
  373. fname: {
  374. text: '饲料名称',
  375. type: String
  376. },
  377. stockweight: {
  378. text: '库存重量',
  379. type: String
  380. }
  381. }
  382. },
  383. textMap: {
  384. create: '新增入库单',
  385. update: '编辑入库单',
  386. see: '查看入库单',
  387. initial: '初始化库存'
  388. },
  389. requestParam: {},
  390. isokDisable: false,
  391. isRoleEdit: [],
  392. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  393. cellStyle: { padding: 0 + 'px' }
  394. }
  395. },
  396. created() {
  397. this.getButtons()
  398. this.getDownList()
  399. this.getList()
  400. },
  401. methods: {
  402. getButtons() {
  403. const Edit = 'Warehousing'
  404. const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
  405. this.isRoleEdit = isRoleEdit
  406. },
  407. getDownList() {
  408. GetDataByNames(this.requestParams).then(response => {
  409. this.feedNameList = response.data.getFeedListEnable.list
  410. this.supplierList = response.data.getProviderListEnable.list
  411. })
  412. },
  413. handleBefore() {
  414. if (this.table.getdataListParm.parammaps.inputDatetime !== '' && this.table.getdataListParm.parammaps.inputDatetime !== null) {
  415. var start = new Date(this.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
  416. var stop = new Date(this.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
  417. this.table.getdataListParm.parammaps.inputDatetime.length = 0
  418. this.table.getdataListParm.parammaps.inputDatetime.push(start, stop)
  419. this.$forceUpdate()
  420. }
  421. },
  422. handleNext() {
  423. if (this.table.getdataListParm.parammaps.inputDatetime !== '' && this.table.getdataListParm.parammaps.inputDatetime !== null) {
  424. var start = new Date(this.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
  425. var stop = new Date(this.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
  426. this.table.getdataListParm.parammaps.inputDatetime.length = 0
  427. this.table.getdataListParm.parammaps.inputDatetime.push(start, stop)
  428. this.$forceUpdate()
  429. }
  430. },
  431. getList() {
  432. this.table.listLoading = true
  433. GetDataByName(this.table.getdataListParm).then(response => {
  434. console.log('table数据', response.data.list)
  435. if (response.data.list !== null) {
  436. this.table.list = response.data.list
  437. this.table.pageNum = response.data.pageNum
  438. this.table.pageSize = response.data.pageSize
  439. this.table.total = response.data.total
  440. } else {
  441. this.table.list = []
  442. }
  443. setTimeout(() => {
  444. this.table.listLoading = false
  445. }, 100)
  446. })
  447. },
  448. handleSearch() {
  449. // console.log('点击了查询')
  450. if (this.table.getdataListParm.parammaps.inputDatetime !== '' && this.table.getdataListParm.parammaps.inputDatetime !== null) {
  451. this.table.getdataListParm.parammaps.startTime = parseTime(this.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  452. this.table.getdataListParm.parammaps.stopTime = parseTime(this.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  453. } else {
  454. this.table.getdataListParm.parammaps.inputDatetime = ''
  455. this.table.getdataListParm.parammaps.startTime = ''
  456. this.table.getdataListParm.parammaps.stopTime = ''
  457. }
  458. this.table.getdataListParm.offset = 1
  459. this.getList()
  460. },
  461. handleRefresh() {
  462. console.log('点击了重置')
  463. this.table.getdataListParm.parammaps.inputDatetime = ''
  464. this.table.getdataListParm.parammaps.startTime = ''
  465. this.table.getdataListParm.parammaps.stopTime = ''
  466. this.table.getdataListParm.parammaps.feedid = ''
  467. this.table.getdataListParm.parammaps.islaid = ''
  468. this.table.getdataListParm.parammaps.providerid = ''
  469. this.table.getdataListParm.offset = 1
  470. },
  471. resetCreateTemp() {
  472. this.create.createTemp = {
  473. pastureid: Cookies.get('pastureid'), laiddate: parseTime(new Date(), '{y}-{m}-{d}'), feedid: '', feedname: '', operateweight: '', providerid: '', providername: '', startweight: '', priceold: '', contractcode: '', pricenew: '', sumprice: '', grossweight: '', tareweight: '', licence: '', pcpde: '', createemp: Cookies.get('employename'), createdate: parseTime(new Date(), '{y}-{m}-{d}'), remark: '', 'wagonnumber': ''
  474. }
  475. this.contractNoList = []
  476. },
  477. // 供应商
  478. changeSupplier(item) {
  479. console.log(item)
  480. if (item !== '') {
  481. this.create.createTemp.providername = this.supplierList.find(obj => obj.id == item).providerName
  482. } else {
  483. this.create.createTemp.providername = ''
  484. this.contractNoList = []
  485. }
  486. if (this.create.createTemp.feedid !== '' && this.create.createTemp.providerid !== '') {
  487. this.getContractNoList()
  488. }
  489. },
  490. // 合同编号
  491. changeContractNo(item) {
  492. if (item !== '') {
  493. this.create.createTemp.pricenew = this.contractNoList.find(obj => obj.contractcode == item).price
  494. } else {
  495. this.create.createTemp.pricenew = ''
  496. }
  497. if (this.create.createTemp.operateweight !== '' && this.create.createTemp.pricenew !== '') {
  498. this.create.createTemp.sumprice = parseFloat(this.create.createTemp.operateweight) * parseFloat(this.create.createTemp.pricenew)
  499. this.create.createTemp.sumprice = this.create.createTemp.sumprice.toFixed(2)
  500. if (this.create.createTemp.sumprice.length > 15) {
  501. this.$message({ type: 'error', message: '数值过大请重新输入', duration: 2000 })
  502. }
  503. }
  504. },
  505. getContractNoList() {
  506. this.create.getdataListParm.parammaps.feedid = this.create.createTemp.feedid
  507. this.create.getdataListParm.parammaps.providerid = this.create.createTemp.providerid
  508. GetDataByName(this.create.getdataListParm).then(response => {
  509. console.log('table数据', response.data.list)
  510. if (response.data.list !== null) {
  511. this.contractNoList = response.data.list
  512. this.create.createTemp.contractcode = ''
  513. this.create.createTemp.pricenew = ''
  514. this.create.createTemp.sumprice = ''
  515. } else {
  516. this.contractNoList = []
  517. this.create.createTemp.contractcode = ''
  518. this.create.createTemp.pricenew = ''
  519. this.create.createTemp.sumprice = ''
  520. }
  521. })
  522. },
  523. feedNameSearch(queryString, cb) {
  524. this.create.getfeedNameParm.parammaps['fname'] = queryString
  525. GetDataByName(this.create.getfeedNameParm).then(response => {
  526. console.log('模糊查询搜索data', response.data.list)
  527. if (response.data.list == null) {
  528. cb([])
  529. } else {
  530. cb(response.data.list)
  531. }
  532. })
  533. },
  534. handleSelectFeedName(item) {
  535. console.log('模糊查询选中值', item)
  536. this.create.createTemp.feedname = item.fname
  537. this.create.createTemp.feedid = item.id
  538. this.create.createTemp.startweight = item.stockweight
  539. this.create.createTemp.priceold = item.price
  540. this.create.createTemp.providerid = ''
  541. this.create.createTemp.providername = ''
  542. this.create.createTemp.contractcode = ''
  543. this.create.createTemp.pricenew = ''
  544. this.create.createTemp.sumprice = ''
  545. if (this.create.createTemp.feedid !== '' && this.create.createTemp.providerid !== '') {
  546. this.getContractNoList()
  547. }
  548. },
  549. blurFeedName() {
  550. this.create.createTemp.feedname = ''
  551. this.create.createTemp.feedid = ''
  552. this.create.createTemp.startweight = ''
  553. this.create.createTemp.priceold = ''
  554. this.create.createTemp.providerid = ''
  555. this.create.createTemp.providername = ''
  556. this.create.createTemp.contractcode = ''
  557. this.create.createTemp.pricenew = ''
  558. this.create.createTemp.sumprice = ''
  559. },
  560. // 入库重量
  561. blurOperateweight() {
  562. // 毛重grossweight皮重tareweight入库重量operateweight
  563. if (this.create.createTemp.grossweight !== '' && this.create.createTemp.operateweight !== '') {
  564. this.create.createTemp.tareweight = parseFloat(this.create.createTemp.grossweight) - parseFloat(this.create.createTemp.operateweight)
  565. }
  566. if (this.create.createTemp.grossweight !== '' && this.create.createTemp.operateweight !== '') {
  567. if (parseFloat(this.create.createTemp.operateweight) > parseFloat(this.create.createTemp.grossweight)) {
  568. this.create.createTemp.grossweight = this.create.createTemp.operateweight
  569. this.create.createTemp.tareweight = parseFloat(this.create.createTemp.operateweight) - parseFloat(this.create.createTemp.operateweight)
  570. }
  571. }
  572. if (this.create.createTemp.tareweight !== '' && this.create.createTemp.grossweight !== '') {
  573. if (this.create.createTemp.operateweight == '') {
  574. this.create.createTemp.operateweight = (parseFloat(this.create.createTemp.grossweight) - parseFloat(this.create.createTemp.tareweight))
  575. }
  576. if (parseFloat(this.create.createTemp.tareweight) > parseFloat(this.create.createTemp.grossweight)) {
  577. this.create.createTemp.tareweight = this.create.createTemp.grossweight
  578. this.create.createTemp.operateweight = (parseFloat(this.create.createTemp.grossweight) - parseFloat(this.create.createTemp.tareweight))
  579. }
  580. }
  581. if (this.create.createTemp.operateweight !== '' && this.create.createTemp.pricenew !== '') {
  582. this.create.createTemp.sumprice = parseFloat(this.create.createTemp.operateweight) * parseFloat(this.create.createTemp.pricenew)
  583. this.create.createTemp.sumprice = this.create.createTemp.sumprice.toFixed(2)
  584. if (this.create.createTemp.sumprice.length > 15) {
  585. this.$message({ type: 'error', message: '数值过大请重新输入', duration: 2000 })
  586. }
  587. } else {
  588. this.create.createTemp.sumprice = ''
  589. }
  590. },
  591. // 毛重
  592. blurGrossweight() {
  593. // 毛重grossweight皮重tareweight入库重量operateweight
  594. if (this.create.createTemp.grossweight !== '' && this.create.createTemp.operateweight !== '') {
  595. this.create.createTemp.tareweight = parseFloat(this.create.createTemp.grossweight) - parseFloat(this.create.createTemp.operateweight)
  596. }
  597. if (this.create.createTemp.grossweight !== '' && this.create.createTemp.operateweight !== '') {
  598. if (parseFloat(this.create.createTemp.operateweight) > parseFloat(this.create.createTemp.grossweight)) {
  599. this.create.createTemp.grossweight = this.create.createTemp.operateweight
  600. this.create.createTemp.tareweight = parseFloat(this.create.createTemp.operateweight) - parseFloat(this.create.createTemp.operateweight)
  601. }
  602. }
  603. },
  604. // 皮重
  605. blurTareweight() {
  606. // 毛重grossweight皮重tareweight入库重量operateweight
  607. if (this.create.createTemp.operateweight !== '' && this.create.createTemp.tareweight !== '') {
  608. this.create.createTemp.grossweight = parseFloat(this.create.createTemp.tareweight) + parseFloat(this.create.createTemp.operateweight)
  609. }
  610. if (this.create.createTemp.grossweight !== '' && this.create.createTemp.operateweight !== '') {
  611. if (parseFloat(this.create.createTemp.operateweight) > parseFloat(this.create.createTemp.grossweight)) {
  612. this.create.createTemp.grossweight = this.create.createTemp.operateweight
  613. this.create.createTemp.tareweight = parseFloat(this.create.createTemp.operateweight) - parseFloat(this.create.createTemp.operateweight)
  614. }
  615. }
  616. if (this.create.createTemp.tareweight !== '' && this.create.createTemp.grossweight !== '') {
  617. if (parseFloat(this.create.createTemp.tareweight) > parseFloat(this.create.createTemp.grossweight)) {
  618. this.create.createTemp.tareweight = this.create.createTemp.grossweight
  619. this.create.createTemp.operateweight = (parseFloat(this.create.createTemp.grossweight) - parseFloat(this.create.createTemp.tareweight))
  620. }
  621. }
  622. },
  623. // 单价
  624. blurPricenew() {
  625. if (this.create.createTemp.operateweight !== '' && this.create.createTemp.pricenew !== '') {
  626. this.create.createTemp.sumprice = parseFloat(this.create.createTemp.operateweight) * parseFloat(this.create.createTemp.pricenew)
  627. this.create.createTemp.sumprice = this.create.createTemp.sumprice.toFixed(2)
  628. if (this.create.createTemp.sumprice.length > 15) {
  629. this.$message({ type: 'error', message: '数值过大请重新输入', duration: 2000 })
  630. }
  631. } else {
  632. this.create.createTemp.sumprice = ''
  633. }
  634. },
  635. // 总价
  636. blurSumprice() {
  637. if (this.create.createTemp.sumprice !== '' && this.create.createTemp.pricenew !== '') {
  638. this.create.createTemp.operateweight = parseFloat(this.create.createTemp.sumprice) / parseFloat(this.create.createTemp.pricenew)
  639. this.create.createTemp.operateweight = this.create.createTemp.operateweight.toFixed(2)
  640. } else {
  641. this.create.createTemp.operateweight = ''
  642. }
  643. },
  644. handleCreate() {
  645. console.log('点击了新增入库单')
  646. this.resetCreateTemp()
  647. this.create.dialogStatus = 'create'
  648. this.create.dialogFormVisible = true
  649. this.$nextTick(() => {
  650. this.$refs.createTemp.resetFields()
  651. })
  652. },
  653. createData() {
  654. this.$refs['createTemp'].validate(valid => {
  655. if (valid) {
  656. if (this.create.createTemp.operateweight == '' && this.create.createTemp.grossweight == '') {
  657. this.$message({ type: 'error', message: '请输入入库重量或毛重', duration: 2000 })
  658. return false
  659. }
  660. const keepTwoNum = /^\d+(\.\d{1,2})?$/
  661. // 入库重量
  662. if (this.create.createTemp.operateweight !== '') {
  663. if (this.create.createTemp.operateweight == 0) {
  664. this.$message({ type: 'error', message: '入库重量请输入自然数并保留两位小数', duration: 2000 })
  665. return false
  666. } else {
  667. if (!keepTwoNum.test(parseFloat(this.create.createTemp.operateweight))) {
  668. this.$message({ type: 'error', message: '入库重量请输入自然数并保留两位小数', duration: 2000 })
  669. return false
  670. }
  671. }
  672. }
  673. // 单价
  674. if (this.create.createTemp.pricenew == 0) {
  675. this.$message({ type: 'error', message: '单价请输入自然数并保留两位小数', duration: 2000 })
  676. return false
  677. } else {
  678. if (!keepTwoNum.test(parseFloat(this.create.createTemp.pricenew))) {
  679. this.$message({ type: 'error', message: '单价请输入自然数并保留两位小数', duration: 2000 })
  680. return false
  681. }
  682. }
  683. // 总价
  684. if (this.create.createTemp.pricenew !== '' && this.create.createTemp.operateweight !== '') {
  685. if (this.create.createTemp.sumprice == 0) {
  686. this.$message({ type: 'error', message: '总价请输入自然数并保留两位小数', duration: 2000 })
  687. return false
  688. } else {
  689. if (!keepTwoNum.test(parseFloat(this.create.createTemp.sumprice))) {
  690. this.$message({ type: 'error', message: '总价请输入自然数并保留两位小数', duration: 2000 })
  691. return false
  692. }
  693. }
  694. }
  695. // 毛重
  696. if (this.create.createTemp.grossweight !== '') {
  697. if (this.create.createTemp.grossweight == 0) {
  698. this.$message({ type: 'error', message: '毛重请输入自然数并保留两位小数', duration: 2000 })
  699. return false
  700. } else {
  701. if (!keepTwoNum.test(parseFloat(this.create.createTemp.grossweight))) {
  702. this.$message({ type: 'error', message: '毛重请输入自然数并保留两位小数', duration: 2000 })
  703. return false
  704. }
  705. }
  706. }
  707. // 皮重
  708. if (this.create.createTemp.tareweight !== '') {
  709. if (this.create.createTemp.tareweight == 0) {
  710. this.$message({ type: 'error', message: '皮重请输入自然数并保留两位小数', duration: 2000 })
  711. return false
  712. } else {
  713. if (!keepTwoNum.test(parseFloat(this.create.createTemp.tareweight))) {
  714. this.$message({ type: 'error', message: '皮重请输入自然数并保留两位小数', duration: 2000 })
  715. return false
  716. }
  717. }
  718. }
  719. MessageBox.confirm('是否确认保存当前内容', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  720. }).then(() => {
  721. this.isokDisable = true
  722. setTimeout(() => {
  723. this.isokDisable = false
  724. }, 1000)
  725. this.requestParam.common = { 'returnmap': '0' }
  726. this.requestParam.data = []
  727. this.requestParam.data[0] = { 'name': 'insertFeedlaid', 'type': 'e', 'parammaps': {
  728. 'pastureid': this.create.createTemp.pastureid,
  729. 'laiddate': this.create.createTemp.laiddate,
  730. 'feedid': this.create.createTemp.feedid,
  731. 'feedname': this.create.createTemp.feedname,
  732. 'providerid': this.create.createTemp.providerid,
  733. 'providername': this.create.createTemp.providername,
  734. 'contractcode': this.create.createTemp.contractcode,
  735. 'operateweight': this.create.createTemp.operateweight,
  736. 'grossweight': this.create.createTemp.grossweight,
  737. 'tareweight': this.create.createTemp.tareweight,
  738. 'sumprice': this.create.createTemp.sumprice,
  739. 'licence': this.create.createTemp.licence,
  740. 'pcpde': this.create.createTemp.pcpde,
  741. 'remark': this.create.createTemp.remark,
  742. 'createdate': this.create.createTemp.createdate,
  743. 'createemp': this.create.createTemp.createemp,
  744. 'startweight': this.create.createTemp.startweight,
  745. 'priceold': this.create.createTemp.priceold,
  746. 'pricenew': this.create.createTemp.pricenew,
  747. 'wagonnumber': this.create.createTemp.wagonnumber
  748. }}
  749. if (this.create.createTemp.operateweight !== '' && parseFloat(this.create.createTemp.operateweight) > 0) {
  750. this.requestParam.data[1] = { 'name': 'insertFeedstorageLaid', 'type': 'e', 'parammaps': {
  751. 'operateweight': this.create.createTemp.operateweight,
  752. 'pastureid': this.create.createTemp.pastureid,
  753. 'feedid': this.create.createTemp.feedid,
  754. 'fname': this.create.createTemp.fname,
  755. 'pcpde': this.create.createTemp.pcpde,
  756. 'stockweight': this.create.createTemp.startweight,
  757. 'price': this.create.createTemp.pricenew
  758. }}
  759. }
  760. console.log('点击了新增入库单保存', this.requestParam)
  761. ExecDataByConfig(this.requestParam).then(response => {
  762. if (response.msg === 'fail') {
  763. failproccess(response, this.$notify)
  764. } else {
  765. this.$notify({ title: '', message: '成功', type: 'success', duration: 2000 })
  766. this.create.dialogFormVisible = false
  767. this.getList()
  768. }
  769. })
  770. })
  771. }
  772. })
  773. },
  774. handleUpdate(row) {
  775. console.log('点击了编辑')
  776. this.$nextTick(() => {
  777. this.$refs.createTemp.resetFields()
  778. })
  779. this.create.dialogStatus = 'update'
  780. this.create.dialogFormVisible = true
  781. row.feedid = String(row.feedid)
  782. this.create.createTemp = Object.assign({}, row)
  783. },
  784. updateData() {
  785. this.$refs['createTemp'].validate(valid => {
  786. if (valid) {
  787. if (this.create.createTemp.operateweight == '' && this.create.createTemp.grossweight == '') {
  788. this.$message({ type: 'error', message: '请输入入库重量或毛重', duration: 2000 })
  789. return false
  790. }
  791. MessageBox.confirm('是否确认保存当前内容', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  792. }).then(() => {
  793. this.isokDisable = true
  794. setTimeout(() => {
  795. this.isokDisable = false
  796. }, 1000)
  797. this.requestParam.common = { 'returnmap': '0' }
  798. this.requestParam.data = []
  799. this.requestParam.data[0] = { 'name': 'updateFeedlaid', 'type': 'e', 'parammaps': {
  800. 'pastureid': this.create.createTemp.pastureid,
  801. 'id': this.create.createTemp.id,
  802. 'laiddate': this.create.createTemp.laiddate,
  803. 'feedid': this.create.createTemp.feedid,
  804. 'feedname': this.create.createTemp.feedname,
  805. 'providerid': this.create.createTemp.providerid,
  806. 'providername': this.create.createTemp.providername,
  807. 'contractcode': this.create.createTemp.contractcode,
  808. 'operateweight': this.create.createTemp.operateweight,
  809. 'grossweight': this.create.createTemp.grossweight,
  810. 'tareweight': this.create.createTemp.tareweight,
  811. 'sumprice': this.create.createTemp.sumprice,
  812. 'licence': this.create.createTemp.licence,
  813. 'pcpde': this.create.createTemp.pcpde,
  814. 'remark': this.create.createTemp.remark,
  815. 'createdate': this.create.createTemp.createdate,
  816. 'createemp': this.create.createTemp.createemp,
  817. 'startweight': this.create.createTemp.startweight,
  818. 'priceold': this.create.createTemp.priceold,
  819. 'pricenew': this.create.createTemp.pricenew,
  820. 'wagonnumber': this.create.createTemp.wagonnumber
  821. }}
  822. if (this.create.createTemp.operateweight !== '' && parseFloat(this.create.createTemp.operateweight) > 0) {
  823. this.requestParam.data[1] = { 'name': 'insertFeedstorageLaid', 'type': 'e', 'parammaps': {
  824. 'operateweight': this.create.createTemp.operateweight,
  825. 'pastureid': this.create.createTemp.pastureid,
  826. 'feedid': this.create.createTemp.feedid,
  827. 'fname': this.create.createTemp.fname,
  828. 'pcpde': this.create.createTemp.pcpde,
  829. 'stockweight': this.create.createTemp.startweight,
  830. 'price': this.create.createTemp.pricenew
  831. }}
  832. }
  833. console.log('点击了新增入库单保存', this.requestParam)
  834. ExecDataByConfig(this.requestParam).then(response => {
  835. if (response.msg === 'fail') {
  836. failproccess(response, this.$notify)
  837. } else {
  838. this.$notify({ title: '', message: '成功', type: 'success', duration: 2000 })
  839. this.create.dialogFormVisible = false
  840. this.getList()
  841. }
  842. })
  843. })
  844. }
  845. })
  846. },
  847. handleSee(row) {
  848. console.log('点击了查看')
  849. this.$nextTick(() => {
  850. this.$refs.createTemp.resetFields()
  851. })
  852. this.create.dialogStatus = 'see'
  853. this.create.dialogFormVisible = true
  854. this.create.createTemp = Object.assign({}, row)
  855. },
  856. handleInitial() {
  857. console.log('点击了初始化库存')
  858. this.initial.dialogStatus = 'initial'
  859. this.initial.dialogFormVisible = true
  860. this.getInitialList()
  861. },
  862. getInitialList() {
  863. this.initial.listLoading = true
  864. GetDataByName(this.initial.getdataListParm).then(response => {
  865. console.log('table数据', response.data.list)
  866. if (response.data.list !== null) {
  867. this.initial.list = response.data.list
  868. this.initial.pageNum = response.data.pageNum
  869. this.initial.pageSize = response.data.pageSize
  870. this.initial.total = response.data.total
  871. } else {
  872. this.initial.list = []
  873. }
  874. setTimeout(() => {
  875. this.initial.listLoading = false
  876. }, 100)
  877. })
  878. },
  879. handleInitialExport() {
  880. console.log('点击了初始化库存导出')
  881. const ExcelDatas = [
  882. {
  883. tHeader: ['饲料名称', '库存重量'],
  884. filterVal: ['fname', 'stockweight'],
  885. tableDatas: this.initial.list,
  886. sheetName: '初始化库存'
  887. }
  888. ]
  889. json2excel(ExcelDatas, '初始化库存', true, 'xlsx')
  890. },
  891. async handleInitialImport(eve) {
  892. const file = eve.raw
  893. if (!file) return
  894. let reader = await upload(file)
  895. const worker = xlsx.read(reader, { type: 'binary' })
  896. // 将返回的数据转换为json对象的数据
  897. reader = xlsx.utils.sheet_to_json(worker.Sheets[worker.SheetNames[0]])
  898. console.log(reader)
  899. const arr = []
  900. reader.forEach(item => {
  901. const obj = {}
  902. for (const key in this.initial.character) {
  903. if (!this.initial.character.hasOwnProperty(key)) break
  904. let v = this.initial.character[key]
  905. const text = v.text
  906. const type = v.type
  907. v = item[text] || ''
  908. type === 'string' ? (v = String(v)) : null
  909. type === 'number' ? (v = Number(v)) : null
  910. obj[key] = v
  911. }
  912. arr.push(obj)
  913. })
  914. console.log('导入处理后数据', arr)
  915. var sum = 0
  916. for (let i = 0; i < this.initial.list.length; i++) {
  917. for (let j = 0; j < arr.length; j++) {
  918. if (this.initial.list[i].fname == arr[j].fname) {
  919. this.initial.list[i].stockweight = arr[j].stockweight
  920. sum++
  921. arr.splice(j, 1)
  922. }
  923. }
  924. }
  925. console.log(arr)
  926. for (let i = 0; i < arr.length; i++) {
  927. this.$set(arr[i], 'msg', '饲料名称与系统不匹配')
  928. }
  929. console.log(sum)
  930. this.$message({ title: '成功', message: '导入成功:' + sum + '条!', type: 'success', duration: 2000 })
  931. this.$notify({ title: '失败', message: '导入失败:' + arr.length + '条!', type: 'danger', duration: 2000 })
  932. if (arr.length > 0) {
  933. const ExcelDatas1 = [
  934. {
  935. tHeader: ['饲料名称', '库存重量', '报错信息'],
  936. filterVal: ['fname', 'stockweight', 'msg'],
  937. tableDatas: arr,
  938. sheetName: 'ExcelDatas1'
  939. }
  940. ]
  941. json2excel(ExcelDatas1, '初始化库存报错信息', true, 'xlsx')
  942. }
  943. },
  944. initialData() {
  945. console.log('点击了初始化库存保存')
  946. this.isokDisable = true
  947. setTimeout(() => {
  948. this.isokDisable = false
  949. }, 1000)
  950. var rulesStockweight = /^\d+(\.\d{1,2})?$/
  951. for (let i = 0; i < this.initial.list.length; i++) {
  952. if (!rulesStockweight.test(parseFloat(this.initial.list[i].stockweight))) {
  953. this.$message({ type: 'warning', message: '库存重量不可小于0,且保留俩位小数', duration: 2000 })
  954. return false
  955. }
  956. }
  957. this.requestParam.common = { 'returnmap': '0' }
  958. this.requestParam.data = []
  959. this.requestParam.data[0] = { 'name': 'clearFS', 'type': 'e', 'parammaps': {
  960. 'pastureid': Cookies.get('pastureid')
  961. }}
  962. this.requestParam.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.initial.list }}
  963. this.requestParam.data[1].children = []
  964. this.requestParam.data[1].children[0] = { 'name': 'insertFeedstorage', 'type': 'e', 'parammaps': {
  965. pastureid: '@insertSpotList.pastureid',
  966. feedid: '@insertSpotList.feedid',
  967. fname: '@insertSpotList.fname',
  968. pcpde: '@insertSpotList.pcpde',
  969. stockweight: '@insertSpotList.stockweight',
  970. price: '@insertSpotList.price'
  971. }}
  972. ExecDataByConfig(this.requestParam).then(response => {
  973. if (response.msg === 'fail') {
  974. failproccess(response, this.$notify)
  975. } else {
  976. this.$notify({ title: '', message: '成功', type: 'success', duration: 2000 })
  977. this.create.dialogFormVisible = false
  978. this.getList()
  979. }
  980. })
  981. }
  982. }
  983. }
  984. </script>
  985. <style lang="scss" scoped>
  986. .search{margin-top:10px;}
  987. .table{margin-top:10px;}
  988. </style>