SuppliesInventory.vue 84 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097
  1. <template>
  2. <div class="SuppliesInventory-all">
  3. <el-dialog top="10vh" width="1200px" title="入库审核" :visible.sync="Warehousingaudit">
  4. <div class="warehousingaudit-search">
  5. <!-- <div class="warehousingaudit-search-li">
  6. <label>物品类型:</label>
  7. <el-select @change="Warehousingchange" clearable filterable style="width: 180px;" size="small" v-model="WarehousingTypes" placeholder="请选择">
  8. <el-option
  9. v-for="item in RSAuditTypearr"
  10. :key="item.id"
  11. :label="item.name"
  12. :value="item.id">
  13. </el-option>
  14. </el-select>
  15. </div> -->
  16. <div class="warehousingaudit-search-li">
  17. <label>审核状态:</label>
  18. <el-select @change="Warehousingchange" style="width: 120px;" size="small" v-model="WarehousingStatus" placeholder="请选择">
  19. <el-option
  20. v-for="item in WarehousingStatusarr"
  21. :key="item.value"
  22. :label="item.text"
  23. :value="item.value">
  24. </el-option>
  25. </el-select>
  26. </div>
  27. <div class="warehousingaudit-search-li">
  28. <label>物品名称:</label>
  29. <el-input style="width: 160px;" size="small" placeholder="请输入物品名称" v-model="Warehousingname" clearable></el-input>
  30. </div>
  31. <el-button @click="Warehousingchange" style="margin-left: 10px;" size="small" type="primary">查询</el-button>
  32. </div>
  33. <div class="warehousingaudit-table">
  34. <el-table
  35. height="590px"
  36. :data="WarehousingData"
  37. border
  38. style="width: 100%">
  39. <el-table-column
  40. prop="goodsName"
  41. label="物品名称"
  42. width="200">
  43. </el-table-column>
  44. <el-table-column
  45. prop="quantity"
  46. label="数量"
  47. width="50">
  48. </el-table-column>
  49. <el-table-column
  50. prop="createTime"
  51. label="入库时间"
  52. width="150">
  53. </el-table-column>
  54. <el-table-column
  55. prop="createUserName"
  56. label="入库人"
  57. width="70">
  58. </el-table-column>
  59. <el-table-column
  60. prop="statusDesc"
  61. label="审核情况"
  62. width='200'>
  63. <template slot-scope="scope">
  64. <el-popover
  65. placement="top"
  66. width="450"
  67. trigger="hover">
  68. <!-- {{scope.row.statusDesc}} -->
  69. <span v-html="scope.row.statusDesc"></span>
  70. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.statusDesc}}</span>
  71. </el-popover>
  72. </template>
  73. </el-table-column>
  74. <el-table-column
  75. prop="confirmStatusText"
  76. label="审核状态"
  77. width="100">
  78. </el-table-column>
  79. <el-table-column
  80. prop="remark"
  81. label="备注"
  82. width='200'>
  83. <template slot-scope="scope">
  84. <el-popover
  85. placement="top"
  86. width="300"
  87. trigger="hover">
  88. <span v-html="scope.row.remark"></span>
  89. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
  90. </el-popover>
  91. </template>
  92. </el-table-column>
  93. <el-table-column
  94. label="操作">
  95. <template slot-scope="scope">
  96. <el-button size="mini" type="primary" title="通过" @click="GoodsStorageConfirmStatusChange(scope.row,2)" >通过</el-button>
  97. <el-button size="mini" title="不通过" type="danger" @click="GoodsStorageConfirmStatusChange(scope.row,3)">不通过</el-button>
  98. </template>
  99. </el-table-column>
  100. </el-table>
  101. <div class="block">
  102. <el-pagination
  103. @size-change="WarehousingSizeChange"
  104. @current-change="WarehousingCurrentChange"
  105. :current-page="WarehousingcurrentPage"
  106. :page-sizes="[10, 15, 20, 40]"
  107. :page-size="Warehousingpagesize"
  108. layout="total, sizes, prev, pager, next, jumper"
  109. :total="Warehousingcount">
  110. </el-pagination>
  111. </div>
  112. </div>
  113. </el-dialog>
  114. <el-dialog top="10vh" width="1740px" title="领用记录" :visible.sync="ReceiptRecord">
  115. <div class="ReceiptRecord-search">
  116. <div class="ReceiptRecord-search-li">
  117. <label style="margin-left: 0px;">关联团组:</label>
  118. <el-select multiple collapse-tags filterable style="width: 235px;" size="small" v-model="groupID" placeholder="请选择">
  119. <el-option
  120. :style="item.id==0||item.id==-1?'color:#67c23a;':''"
  121. v-for="item in groupNameData"
  122. :key="item.id"
  123. :label="item.groupName"
  124. :value="item.id">
  125. </el-option>
  126. </el-select>
  127. </div>
  128. <div class="ReceiptRecord-search-li">
  129. <label>物品类型:</label>
  130. <el-select multiple collapse-tags filterable style="width: 180px;" size="small" v-model="RSAuditTypes" placeholder="请选择">
  131. <el-option
  132. v-for="item in RSAuditTypearr"
  133. :key="item.id"
  134. :label="item.name"
  135. :value="item.id">
  136. </el-option>
  137. </el-select>
  138. </div>
  139. <div class="ReceiptRecord-search-li">
  140. <label>领用人员:</label>
  141. <el-select multiple collapse-tags filterable style="width: 180px;" size="small" v-model="personnelID" placeholder="请选择">
  142. <el-option
  143. v-for="item in userNameData"
  144. :key="item.id"
  145. :label="item.userName"
  146. :value="item.id">
  147. </el-option>
  148. </el-select>
  149. </div>
  150. <div class="ReceiptRecord-search-li">
  151. <label>审核状态:</label>
  152. <el-select style="width: 120px;" size="small" v-model="RSAuditStatus" placeholder="请选择">
  153. <el-option
  154. v-for="item in options"
  155. :key="item.value"
  156. :label="item.label"
  157. :value="item.value">
  158. </el-option>
  159. </el-select>
  160. </div>
  161. <div class="ReceiptRecord-search-li">
  162. <label>物品名称:</label>
  163. <el-input style="width: 160px;" size="small" placeholder="请输入物品名称" v-model="RSAuditname" clearable></el-input>
  164. </div>
  165. <div class="ReceiptRecord-search-li">
  166. <label>领用时间段:</label>
  167. <el-date-picker
  168. size="small"
  169. style="width: 240px;"
  170. v-model="RSAudittime"
  171. type="daterange"
  172. align="right"
  173. unlink-panels
  174. range-separator="至"
  175. start-placeholder="开始日期"
  176. end-placeholder="结束日期"
  177. :picker-options="pickerOptionss">
  178. </el-date-picker>
  179. </div>
  180. <el-button style="margin-left: 10px;" @click="RecordsGoodsReceiveList(false)" size="small" type="primary">查询</el-button>
  181. <el-button style="margin-left: 10px;" @click="RecordsGoodsReceiveList(true)" size="small" type="primary">导出</el-button>
  182. </div>
  183. <div class="ReceiptRecord-table">
  184. <el-table
  185. height="530px"
  186. :data="RSAuditData"
  187. border
  188. style="width: 100%">
  189. <el-table-column
  190. prop="goodsName"
  191. label="物品名称"
  192. width="200">
  193. </el-table-column>
  194. <el-table-column
  195. prop="quantity"
  196. label="数量"
  197. width="50">
  198. </el-table-column>
  199. <el-table-column
  200. prop="createTime"
  201. label="申请时间"
  202. width="150">
  203. </el-table-column>
  204. <el-table-column
  205. prop="createUserName"
  206. label="申请人"
  207. width="70">
  208. </el-table-column>
  209. <el-table-column
  210. prop="reason"
  211. label="申请原因"
  212. >
  213. <template slot-scope="scope">
  214. <el-popover
  215. placement="top"
  216. width="300"
  217. trigger="hover">
  218. {{scope.row.reason}}
  219. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.reason}}</span>
  220. </el-popover>
  221. </template>
  222. </el-table-column>
  223. <el-table-column
  224. prop="remark"
  225. label="备注">
  226. <template slot-scope="scope">
  227. <el-popover
  228. placement="top"
  229. width="300"
  230. trigger="hover">
  231. {{scope.row.remark}}
  232. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
  233. </el-popover>
  234. </template>
  235. </el-table-column>
  236. <el-table-column
  237. prop="auditUserName"
  238. label="审核人"
  239. width="100">
  240. <template slot-scope="scope">
  241. {{ scope.row.auditStatus==0?"":scope.row.auditUserName }}
  242. </template>
  243. </el-table-column>
  244. <el-table-column
  245. prop="auditTime"
  246. label="审核时间"
  247. width="150">
  248. <template slot-scope="scope">
  249. {{ scope.row.auditStatus==0?"":scope.row.auditTime }}
  250. </template>
  251. </el-table-column>
  252. <el-table-column
  253. prop="auditStatusText"
  254. label="审核状态"
  255. width="100">
  256. </el-table-column>
  257. </el-table>
  258. <div v-if="RSAuditcount>RSAuditpagesize" class="block">
  259. <el-pagination
  260. @size-change="RSAuditSizeChange"
  261. @current-change="RSAuditCurrentChange"
  262. :current-page="RSAuditcurrentPage"
  263. :page-sizes="[10, 15, 20, 40]"
  264. :page-size="RSAuditpagesize"
  265. layout="total, sizes, prev, pager, next, jumper"
  266. :total="RSAuditcount">
  267. </el-pagination>
  268. </div>
  269. </div>
  270. </el-dialog>
  271. <el-dialog top="10vh" class="Approval-dialog" width="1100px" title="领用审核" :visible.sync="ApprovalVisible">
  272. <el-select @change="typevaluechange" style="width: 150px;margin-bottom: 10px;" size="small" v-model="typevalue" placeholder="请选择">
  273. <el-option
  274. v-for="item in options"
  275. :key="item.value"
  276. :label="item.label"
  277. :value="item.value">
  278. </el-option>
  279. </el-select>
  280. <div class="Approval-table">
  281. <el-table
  282. :data="ApprovalData"
  283. border
  284. style="width: 100%">
  285. <el-table-column
  286. prop="goodsName"
  287. label="物品名称"
  288. width="180">
  289. </el-table-column>
  290. <el-table-column
  291. prop="quantity"
  292. label="数量"
  293. width="50">
  294. </el-table-column>
  295. <el-table-column
  296. prop="createTime"
  297. label="申请时间"
  298. width="150">
  299. </el-table-column>
  300. <el-table-column
  301. prop="createUserName"
  302. label="申请人"
  303. width="70">
  304. </el-table-column>
  305. <el-table-column
  306. prop="reason"
  307. label="申请原因"
  308. width="80">
  309. <template slot-scope="scope">
  310. <el-popover
  311. placement="top"
  312. width="300"
  313. trigger="hover">
  314. {{scope.row.reason}}
  315. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.reason}}</span>
  316. </el-popover>
  317. </template>
  318. </el-table-column>
  319. <el-table-column
  320. prop="remark"
  321. label="备注">
  322. <template slot-scope="scope">
  323. <el-popover
  324. placement="top"
  325. width="300"
  326. trigger="hover">
  327. {{scope.row.remark}}
  328. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
  329. </el-popover>
  330. </template>
  331. </el-table-column>
  332. <el-table-column
  333. prop="auditStatusText"
  334. label="审核状态"
  335. width="100">
  336. </el-table-column>
  337. <el-table-column
  338. label="操作"
  339. width="250">
  340. <template slot-scope="scope">
  341. <el-button v-if="scope.row.auditStatus==0||scope.row.auditStatus==2" size="mini" type="primary" title="通过" @click="GoodsReceiveAudit(scope.row.id,1)" >通过</el-button>
  342. <el-button v-if="scope.row.auditStatus==0" size="mini" type="info" title="不通过" @click="GoodsReceiveAudit(scope.row.id,2)">不通过</el-button>
  343. <el-button v-if="scope.row.auditStatus==1" size="mini" type="warning" title="取消通过" @click="GoodsReceiveAudit(scope.row.id,0)">取消通过</el-button>
  344. <el-button size="mini" title="删除" type="danger" @click="Deleteintolibraryreceives(scope.row)">删除</el-button>
  345. </template>
  346. </el-table-column>
  347. </el-table>
  348. <div v-if="Approvalcount>Approvalpagesize" class="block">
  349. <el-pagination
  350. @size-change="ApprovalhandleSizeChange"
  351. @current-change="ApprovalhandleCurrentChange"
  352. :current-page="ApprovalcurrentPage"
  353. :page-sizes="[6, 10, 15, 40]"
  354. :page-size="Approvalpagesize"
  355. layout="total, sizes, prev, pager, next, jumper"
  356. :total="Approvalcount">
  357. </el-pagination>
  358. </div>
  359. </div>
  360. </el-dialog>
  361. <el-dialog top="10vh" width="1200px" title="入库物品" :visible.sync="warehousingsVisible">
  362. <el-form :model="warehousingsruleForm" :rules="warehousingsrules" ref="warehousingsruleForm" label-width="100px" class="demo-ruleForm">
  363. <div class="warehousingsrule-input">
  364. <el-form-item label="入库数量" prop="quantity">
  365. <el-input-number @blur="Sumup" size="small" :precision="2" :controls="false" v-model="warehousingsruleForm.quantity"></el-input-number>
  366. </el-form-item>
  367. <el-form-item label="物品单价" prop="unitPrice">
  368. <el-input-number @blur="Sumup" size="small" :precision="1" :controls="false" v-model="warehousingsruleForm.unitPrice"></el-input-number>
  369. </el-form-item>
  370. <el-form-item label="物品总价" prop="totalPrice">
  371. <el-input-number size="small" :precision="2" :controls="false" v-model="warehousingsruleForm.totalPrice"></el-input-number>
  372. </el-form-item>
  373. <el-form-item label="供应商名称" prop="supplierName">
  374. <el-input size="small" placeholder="请输入物资名称" v-model="warehousingsruleForm.supplierName" clearable></el-input>
  375. </el-form-item>
  376. <el-form-item label="供应商电话" prop="supplierTel">
  377. <el-input size="small" placeholder="请输入供应商电话" v-model="warehousingsruleForm.supplierTel" clearable></el-input>
  378. </el-form-item>
  379. <el-form-item label="供应商地址" prop="supplierAddress">
  380. <el-input size="small" placeholder="请输入供应商地址" v-model="warehousingsruleForm.supplierAddress" clearable></el-input>
  381. </el-form-item>
  382. <el-form-item label="供应商来源" prop="supplierSource">
  383. <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.supplierSource" clearable></el-input>
  384. </el-form-item>
  385. <el-form-item label="入库人员" prop="storageUserId">
  386. <el-select size="small" v-model="warehousingsruleForm.storageUserId" clearable filterable
  387. placeholder="请选择">
  388. <el-option v-for="item in userNameData" :key="item.id" :label="item.userName"
  389. :value="item.id">
  390. </el-option>
  391. </el-select>
  392. <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageUserId" clearable></el-input> -->
  393. </el-form-item>
  394. <el-form-item label="入库时间" prop="storageTime">
  395. <el-date-picker
  396. size="small"
  397. style="width:100%"
  398. v-model="warehousingsruleForm.storageTime"
  399. type="datetime"
  400. placeholder="选择日期时间"
  401. align="right"
  402. :picker-options="pickerOptions">
  403. </el-date-picker>
  404. <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageTime" clearable></el-input> -->
  405. </el-form-item>
  406. <el-form-item style="width:100%;" label="备注" prop="remark">
  407. <el-input size="small" placeholder="请输入备注称" v-model="warehousingsruleForm.remark" clearable></el-input>
  408. </el-form-item>
  409. </div>
  410. <el-form-item style="text-align: right;">
  411. <el-button size="small" @click="resetForm('warehousingsruleForm')">清空</el-button>
  412. <el-button size="small" type="primary" @click="submitForm('warehousingsruleForm')">保存</el-button>
  413. </el-form-item>
  414. </el-form>
  415. <div class="warehousingsrule-table">
  416. <el-table
  417. height="400"
  418. :data="warehousingslist"
  419. border
  420. style="width: 100%">
  421. <el-table-column
  422. prop="unitPrice"
  423. label="物品单价"
  424. width="80">
  425. <template slot-scope="scope">
  426. {{townum(scope.row.unitPrice)}}
  427. </template>
  428. </el-table-column>
  429. <el-table-column
  430. prop="quantity"
  431. label="物品数量"
  432. width="70">
  433. </el-table-column>
  434. <el-table-column
  435. prop="totalPrice"
  436. label="物品总价"
  437. width="80">
  438. <template slot-scope="scope">
  439. {{townum(scope.row.totalPrice)}}
  440. </template>
  441. </el-table-column>
  442. <el-table-column
  443. prop="supplierName"
  444. label="供应商名称">
  445. <template slot-scope="scope">
  446. <el-popover
  447. placement="top"
  448. width="300"
  449. trigger="hover">
  450. {{scope.row.supplierName}}
  451. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierName}}</span>
  452. </el-popover>
  453. </template>
  454. </el-table-column>
  455. <el-table-column
  456. prop="supplierTel"
  457. label="供应商电话">
  458. <template slot-scope="scope">
  459. <el-popover
  460. placement="top"
  461. width="300"
  462. trigger="hover">
  463. {{scope.row.supplierTel}}
  464. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierTel}}</span>
  465. </el-popover>
  466. </template>
  467. </el-table-column>
  468. <el-table-column
  469. prop="supplierAddress"
  470. label="供应商地址">
  471. <template slot-scope="scope">
  472. <el-popover
  473. placement="top"
  474. width="300"
  475. trigger="hover">
  476. {{scope.row.supplierAddress}}
  477. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierAddress}}</span>
  478. </el-popover>
  479. </template>
  480. </el-table-column>
  481. <el-table-column
  482. prop="supplierSource"
  483. label="供应商来源">
  484. <template slot-scope="scope">
  485. <el-popover
  486. placement="top"
  487. width="300"
  488. trigger="hover">
  489. {{scope.row.supplierSource}}
  490. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierSource}}</span>
  491. </el-popover>
  492. </template>
  493. </el-table-column>
  494. <el-table-column
  495. prop="storageTime"
  496. label="入库时间"
  497. width="150">
  498. </el-table-column>
  499. <el-table-column
  500. prop="storageUserName"
  501. label="入库人"
  502. width="80">
  503. </el-table-column>
  504. <el-table-column
  505. label="操作"
  506. width="155">
  507. <template slot-scope="scope">
  508. <el-button size="mini" title="编辑" @click="Editentry(scope.row)">编辑</el-button>
  509. <el-button size="mini" title="删除" type="danger" @click="Deleteintolibrary(scope.row)">删除</el-button>
  510. </template>
  511. </el-table-column>
  512. </el-table>
  513. <div v-if="WScount>WSpagesize" class="block">
  514. <el-pagination
  515. @size-change="WShandleSizeChange"
  516. @current-change="WShandleCurrentChange"
  517. :current-page="WScurrentPage"
  518. :page-sizes="[6, 10, 15, 40]"
  519. :page-size="WSpagesize"
  520. layout="total, sizes, prev, pager, next, jumper"
  521. :total="WScount">
  522. </el-pagination>
  523. </div>
  524. </div>
  525. </el-dialog>
  526. <el-dialog width="400px" title="添加物品" :visible.sync="AddItemsVisible">
  527. <div class="additems-ul">
  528. <div class="additems-li">
  529. <label>物资类型:</label>
  530. <el-select style="width:250px" @change="AddMaterialTypechange(0)" v-model="AddMaterialType" clearable filterable
  531. placeholder="请选择">
  532. <el-option v-for="item in AddMaterialTypearr" :key="item.id" :label="item.name"
  533. :value="item.id">
  534. </el-option>
  535. </el-select>
  536. </div>
  537. <div class="additems-li">
  538. <label>物资详细类型:</label>
  539. <el-select style="width:250px" v-model="AddMaterialinfoType" clearable filterable
  540. placeholder="请选择">
  541. <el-option v-for="item in AddMaterialinfoTypearr" :key="item.id" :label="item.name"
  542. :value="item.id">
  543. </el-option>
  544. </el-select>
  545. </div>
  546. <div class="additems-li">
  547. <label>物资名称:</label>
  548. <el-input
  549. style="width:250px"
  550. placeholder="请输入物资名称"
  551. v-model="AdditemsName"
  552. clearable>
  553. </el-input>
  554. </div>
  555. <div class="additems-li">
  556. <label>单位:</label>
  557. <el-input
  558. style="width:250px"
  559. placeholder="请输入单位"
  560. v-model="unit"
  561. clearable>
  562. </el-input>
  563. </div>
  564. </div>
  565. <div>
  566. <label>备注:</label>
  567. <el-input
  568. style="width:100%;"
  569. type="textarea"
  570. :autosize="{ minRows: 2, maxRows: 4}"
  571. placeholder="请输入内容"
  572. v-model="Additemstextarea">
  573. </el-input>
  574. </div>
  575. <div class="additems-btn">
  576. <el-button @click="AddItemsVisible=false">取消</el-button>
  577. <el-button @click="GoodsOP" type="primary">保存</el-button>
  578. </div>
  579. </el-dialog>
  580. <el-dialog top="10vh" title="领用物品" width="1000px" :visible.sync="ClaimitemVisible">
  581. <label style="display: inline-block;margin-left: 32px;margin-bottom: 10px;">{{Claimitemlabel}}</label>
  582. <el-form :model="ClaimsruleForm" :rules="Claimrules" ref="ClaimsruleForm" label-width="100px" class="demo-ruleForm">
  583. <div class="Claimitem-input">
  584. <el-form-item label="关联团组" prop="groupId">
  585. <el-select size="small" v-model="ClaimsruleForm.groupId" clearable filterable
  586. placeholder="请选择">
  587. <el-option :style="item.id==0||item.id==-1||item.id==-2?'color:#67c23a;':''" v-for="item in groupNameData" :key="item.id" :label="item.groupName"
  588. :value="item.id">
  589. </el-option>
  590. </el-select>
  591. <!-- <el-input-number size="small" :precision="2" :controls="false" v-model="ClaimsruleForm.groupId"></el-input-number> -->
  592. </el-form-item>
  593. <el-form-item label="领用数量" prop="quantity">
  594. <el-input-number size="small" :precision="2" :controls="false" v-model="ClaimsruleForm.quantity"></el-input-number>
  595. </el-form-item>
  596. <el-form-item label="领用原因" prop="reason">
  597. <el-input size="small" placeholder="请输入领用原因" v-model="ClaimsruleForm.reason"></el-input>
  598. </el-form-item>
  599. </div>
  600. <el-form-item label="备注" prop="remark">
  601. <el-input size="small" placeholder="请输入备注" v-model="ClaimsruleForm.remark"></el-input>
  602. </el-form-item>
  603. <el-form-item style="text-align: right;">
  604. <el-button size="small" @click="ClaimresetForm('ClaimsruleForm')">清空</el-button>
  605. <el-button size="small" type="primary" @click="ClaimsubmitForm('ClaimsruleForm')">保存</el-button>
  606. </el-form-item>
  607. </el-form>
  608. <div class="claimitem-table">
  609. <el-table
  610. height="400"
  611. :data="ClaimitemData"
  612. border
  613. style="width: 100%">
  614. <el-table-column
  615. prop="goodsName"
  616. label="物品名称"
  617. width="180">
  618. </el-table-column>
  619. <el-table-column
  620. prop="quantity"
  621. label="数量"
  622. width="45">
  623. </el-table-column>
  624. <el-table-column
  625. prop="createTime"
  626. label="申请时间"
  627. width="150">
  628. </el-table-column>
  629. <el-table-column
  630. prop="createUserName"
  631. label="申请人"
  632. width="70">
  633. </el-table-column>
  634. <el-table-column
  635. prop="reason"
  636. label="申请原因"
  637. width="80">
  638. <template slot-scope="scope">
  639. <el-popover
  640. placement="top"
  641. width="300"
  642. trigger="hover">
  643. {{scope.row.reason}}
  644. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.reason}}</span>
  645. </el-popover>
  646. </template>
  647. </el-table-column>
  648. <el-table-column
  649. prop="remark"
  650. label="备注">
  651. <template slot-scope="scope">
  652. <el-popover
  653. placement="top"
  654. width="300"
  655. trigger="hover">
  656. {{scope.row.remark}}
  657. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
  658. </el-popover>
  659. </template>
  660. </el-table-column>
  661. <el-table-column
  662. prop="auditStatusText"
  663. label="审核状态"
  664. width="80">
  665. </el-table-column>
  666. <el-table-column
  667. label="操作"
  668. width="200">
  669. <template slot-scope="scope">
  670. <el-button size="mini" title="编辑" @click="Editentryreceive(scope.row)">编辑</el-button>
  671. <el-button size="mini" title="删除" type="danger" @click="Deleteintolibraryreceive(scope.row)">删除</el-button>
  672. </template>
  673. </el-table-column>
  674. </el-table>
  675. <div v-if="Claimitemcount>Claimitempagesize" class="block">
  676. <el-pagination
  677. @size-change="ClaimitemhandleSizeChange"
  678. @current-change="ClaimitemhandleCurrentChange"
  679. :current-page="ClaimitemcurrentPage"
  680. :page-sizes="[6, 10, 15, 40]"
  681. :page-size="Claimitempagesize"
  682. layout="total, sizes, prev, pager, next, jumper"
  683. :total="Claimitemcount">
  684. </el-pagination>
  685. </div>
  686. </div>
  687. </el-dialog>
  688. <div class="SuppliesInventory-head">
  689. <div class="SuppliesInventory-head-ul">
  690. <div class="SuppliesInventory-head-li">
  691. <label>物资类型:</label>
  692. <el-select style="width:220px" @change="MaterialTypechange" v-model="MaterialType" clearable filterable
  693. placeholder="请选择">
  694. <el-option v-for="item in MaterialTypearr" :key="item.id" :label="item.name"
  695. :value="item.id">
  696. </el-option>
  697. </el-select>
  698. </div>
  699. <div class="SuppliesInventory-head-li">
  700. <label>物资详细类型:</label>
  701. <el-select @change="MaterialinfoTypechange" style="width:220px" multiple collapse-tags v-model="MaterialinfoType" clearable filterable
  702. placeholder="请选择">
  703. <el-option v-for="item in MaterialinfoTypearr" :key="item.id" :label="item.name"
  704. :value="item.id">
  705. </el-option>
  706. </el-select>
  707. </div>
  708. <div class="SuppliesInventory-head-li">
  709. <label>物资名称:</label>
  710. <el-input
  711. style="width:220px"
  712. placeholder="请输入内容"
  713. v-model="Materialname"
  714. clearable>
  715. </el-input>
  716. </div>
  717. <div class="SuppliesInventory-head-li">
  718. <el-button @click="GoodsList" type="primary">查 询</el-button>
  719. </div>
  720. </div>
  721. <div>
  722. <el-button v-if="Auditauthority" @click="GoodsStorageExcelDownload" type="primary">入库记录导出</el-button>
  723. <el-button v-if="Auditauthority" @click="inquireRecords" type="primary">领用记录</el-button>
  724. <el-button v-if="Auditauthority" @click="Warehousingwicket" type="primary">入库审核</el-button>
  725. <el-button v-if="Auditauthority" @click="GoodsReceiveLists" type="primary">审核</el-button>
  726. <el-button v-if="Addpermission" @click="addbtnclick" type="primary">新增物品</el-button>
  727. </div>
  728. </div>
  729. <div class="SuppliesInventory-table">
  730. <el-table
  731. :data="tableData"
  732. border
  733. style="width: 100%">
  734. <el-table-column
  735. prop="name"
  736. label="物品名称"
  737. width="180">
  738. </el-table-column>
  739. <el-table-column
  740. prop="typeName"
  741. label="物品详细类型"
  742. width="180">
  743. </el-table-column>
  744. <el-table-column
  745. prop="stockQuantity"
  746. label="物品数量"
  747. width="100">
  748. </el-table-column>
  749. <el-table-column
  750. prop="unit"
  751. label="单位"
  752. width="100">
  753. </el-table-column>
  754. <el-table-column
  755. prop="lastUpdateUserName"
  756. label="最后录入人"
  757. width="100">
  758. </el-table-column>
  759. <el-table-column
  760. prop="lastUpdateTime"
  761. label="最后录入时间"
  762. width="180">
  763. </el-table-column>
  764. <el-table-column
  765. prop="remark"
  766. label="备注">
  767. </el-table-column>
  768. <el-table-column
  769. label="操作"
  770. width="300">
  771. <template slot-scope="scope">
  772. <el-button v-if="Editpermission" size="mini" title="编辑" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
  773. <el-button v-if="Addpermission" size="mini" @click="instorage(scope.row)" type="primary">入库</el-button>
  774. <el-button size="mini" @click="GoodsReceiveList(scope.row)" type="success">领用</el-button>
  775. <el-button v-if="Deletepermission" size="mini" title="删除" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
  776. </template>
  777. </el-table-column>
  778. </el-table>
  779. <div v-if="count>pagesize" class="block">
  780. <el-pagination
  781. @size-change="handleSizeChange"
  782. @current-change="handleCurrentChange"
  783. :current-page="currentPage"
  784. :page-sizes="[10, 15, 30, 40]"
  785. :page-size="pagesize"
  786. layout="total, sizes, prev, pager, next, jumper"
  787. :total="count">
  788. </el-pagination>
  789. </div>
  790. </div>
  791. </div>
  792. </template>
  793. <script>
  794. export default {
  795. data() {
  796. return {
  797. pickerOptionss: {
  798. shortcuts: [{
  799. text: '最近一周',
  800. onClick(picker) {
  801. const end = new Date();
  802. const start = new Date();
  803. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  804. picker.$emit('pick', [start, end]);
  805. }
  806. }, {
  807. text: '最近一个月',
  808. onClick(picker) {
  809. const end = new Date();
  810. const start = new Date();
  811. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  812. picker.$emit('pick', [start, end]);
  813. }
  814. }, {
  815. text: '最近三个月',
  816. onClick(picker) {
  817. const end = new Date();
  818. const start = new Date();
  819. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  820. picker.$emit('pick', [start, end]);
  821. }
  822. }]
  823. },
  824. pickerOptions: {
  825. shortcuts: [{
  826. text: '今天',
  827. onClick(picker) {
  828. picker.$emit('pick', new Date());
  829. }
  830. }, {
  831. text: '昨天',
  832. onClick(picker) {
  833. const date = new Date();
  834. date.setTime(date.getTime() - 3600 * 1000 * 24);
  835. picker.$emit('pick', date);
  836. }
  837. }, {
  838. text: '一周前',
  839. onClick(picker) {
  840. const date = new Date();
  841. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
  842. picker.$emit('pick', date);
  843. }
  844. }]
  845. },
  846. Userid:'',
  847. token:"",
  848. MaterialType:'',
  849. MaterialTypearr:[],
  850. MaterialinfoType:[],
  851. MaterialinfoTypes:'',
  852. MaterialinfoTypearr:[],
  853. Materialname:'',
  854. tableData:[],
  855. AddItemsVisible:false,
  856. currentPage:1,
  857. pagesize:10,
  858. count:0,
  859. WScurrentPage:1,
  860. WSpagesize:6,
  861. WScount:0,
  862. ClaimitemcurrentPage:1,
  863. Claimitempagesize:6,
  864. Claimitemcount:0,
  865. ApprovalcurrentPage:1,
  866. Approvalpagesize:6,
  867. Approvalcount:0,
  868. //新增物品参数
  869. AddMaterialType:"",
  870. AddMaterialTypearr:[],
  871. AddMaterialinfoType:"",
  872. AddMaterialinfoTypearr:[],
  873. AdditemsName:"",
  874. unit:"",
  875. Additemstextarea:"",
  876. ID:0,
  877. groupNameData:[],
  878. //入库参数
  879. userNameData:[],
  880. warehousingslist:[],
  881. warehousingsVisible:false,
  882. warehousingsruleForm: {
  883. id:0,
  884. quantity: 0,
  885. unitPrice: 0,
  886. totalPrice: 0,
  887. supplierName: '',
  888. supplierTel: '',
  889. supplierAddress: '',
  890. supplierSource: '',
  891. storageUserId:'',
  892. storageTime:'',
  893. remark: ''
  894. },
  895. warehousingsrules: {
  896. quantity: [
  897. { required: true, message: '请输入', trigger: 'blur' },
  898. ],
  899. unitPrice: [
  900. { required: true, message: '请输入', trigger: 'blur' },
  901. ],
  902. totalPrice: [
  903. { required: true, message: '请输入', trigger: 'blur' },
  904. ],
  905. supplierName: [
  906. { required: true, message: '请输入', trigger: 'blur' },
  907. ],
  908. supplierTel: [
  909. { required: true, message: '请输入', trigger: 'blur' },
  910. ],
  911. supplierAddress: [
  912. { required: true, message: '请输入', trigger: 'blur' },
  913. ],
  914. supplierSource: [
  915. { required: true, message: '请输入', trigger: 'blur' },
  916. ],
  917. storageUserId: [
  918. { required: true, message: '请选择', trigger: 'change' },
  919. ],
  920. storageTime: [
  921. { required: true, message: '请选择', trigger: 'blur' },
  922. ],
  923. remark: [
  924. { required: true, message: '请输入', trigger: 'blur' },
  925. ],
  926. },
  927. typevalue:'',
  928. //领用参数
  929. ClaimitemVisible:false,
  930. ClaimitemData:[],
  931. ClaimsruleForm:{
  932. id:0,
  933. groupId:'',
  934. quantity:0,
  935. reason:'',
  936. remark:'',
  937. },
  938. Claimrules:{
  939. groupId: [
  940. { required: true, message: '请选择', trigger: 'change' },
  941. ],
  942. quantity: [
  943. { required: true, message: '请输入', trigger: 'blur' },
  944. ],
  945. reason: [
  946. { required: true, message: '请输入', trigger: 'blur' },
  947. ],
  948. remark: [
  949. { required: true, message: '请输入', trigger: 'blur' },
  950. ],
  951. },
  952. Claimitemlabel:'',
  953. //审核参数
  954. options:[
  955. {
  956. value: '',
  957. label: '全部'
  958. },
  959. {
  960. value: 0,
  961. label: '待审核'
  962. },
  963. {
  964. value: 1,
  965. label: '审核通过'
  966. },
  967. {
  968. value: 2,
  969. label: '未通过'
  970. },
  971. ],
  972. ApprovalVisible:false,
  973. ApprovalData:[],
  974. //shqx
  975. Auditauthority:false,
  976. Editpermission:false,
  977. Addpermission:false,
  978. Deletepermission:false,
  979. //领用记录
  980. ReceiptRecord:false,
  981. groupID:[],
  982. groupIDarr:[],
  983. personnelID:[],
  984. personnelIDarr:[],
  985. RSAuditStatus:'',
  986. RSAuditname:'',
  987. RSAudittime:'',
  988. RSAuditTypes:[],
  989. RSAuditTypearr:[],
  990. RSAuditData:[],
  991. RSAuditcurrentPage:1,
  992. RSAuditpagesize:10,
  993. RSAuditcount:0,
  994. //入库审核
  995. Warehousingaudit:false,
  996. WarehousingTypes:'',
  997. WarehousingStatus:-1,
  998. WarehousingStatusarr:[],
  999. Warehousingname:'',
  1000. WarehousingData:[],
  1001. WarehousingcurrentPage:1,
  1002. Warehousingpagesize:10,
  1003. Warehousingcount:0,
  1004. }
  1005. },
  1006. methods:{
  1007. //保留两位小数
  1008. townum(val){
  1009. val=Number(val);
  1010. return val.toFixed(2);
  1011. },
  1012. //处理日期
  1013. datetimes(val){
  1014. var date=new Date(val);
  1015. var y=date.getFullYear();
  1016. var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
  1017. var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
  1018. var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
  1019. var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
  1020. var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
  1021. return y+'-'+m+'-'+d
  1022. },
  1023. //处理日期
  1024. datetime(val){
  1025. var date=new Date(val);
  1026. var y=date.getFullYear();
  1027. var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
  1028. var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
  1029. var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
  1030. var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
  1031. var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
  1032. return y+'-'+m+'-'+d+" "+s+':'+f+':'+mm
  1033. },
  1034. //获取
  1035. GoodsInitDataSource() {
  1036. var url = "/api/PersonnelModule/GoodsInitDataSource"
  1037. var that = this
  1038. this.$axios({
  1039. method: 'get',
  1040. url: url,
  1041. headers: {
  1042. Authorization: 'Bearer '
  1043. }
  1044. }).then(function (res) {
  1045. if (res.data.code == 200) {
  1046. that.MaterialTypearr=res.data.data.goodsTypeData;
  1047. that.AddMaterialTypearr=res.data.data.goodsTypeData;
  1048. that.userNameData=res.data.data.userNameData;
  1049. that.groupNameData=res.data.data.groupNameData;
  1050. that.WarehousingStatusarr=res.data.data.stockStatus;
  1051. // that.groupNameData.unshift(
  1052. // {
  1053. // id:0,
  1054. // groupName:"其他物资(公司内部物资)"
  1055. // },
  1056. // {
  1057. // id:-1,
  1058. // groupName:"拜访客户所使用的物资"
  1059. // }
  1060. // )
  1061. // that.MaterialType=that.MaterialTypearr[0].id;
  1062. that.MaterialTypechange();
  1063. for (let k = 0; k < that.MaterialTypearr.length; k++) {
  1064. for (let l = 0; l < that.MaterialTypearr[k].subTypeItems.length; l++) {
  1065. that.RSAuditTypearr.push(that.MaterialTypearr[k].subTypeItems[l])
  1066. }
  1067. }
  1068. } else {
  1069. that.$message.error(res.data.msg);
  1070. }
  1071. })
  1072. },
  1073. //物资类型切换
  1074. MaterialTypechange(val){
  1075. this.MaterialinfoType="";
  1076. this.MaterialinfoTypearr=[];
  1077. for(let i=0;i<this.MaterialTypearr.length;i++){
  1078. if(this.MaterialType==this.MaterialTypearr[i].id){
  1079. this.MaterialinfoTypearr=this.MaterialTypearr[i].subTypeItems;
  1080. }
  1081. }
  1082. if(val==undefined){
  1083. this.GoodsList();
  1084. }
  1085. },
  1086. //物资详情选择
  1087. MaterialinfoTypechange(){
  1088. this.MaterialinfoTypes=""
  1089. for(let i=0;i<this.MaterialinfoType.length;i++){
  1090. this.MaterialinfoTypes+=this.MaterialinfoType[i]+','
  1091. }
  1092. this.MaterialinfoTypes=this.MaterialinfoTypes.substring(0, this.MaterialinfoTypes.length - 1);
  1093. },
  1094. //入库
  1095. Warehousingchange(){
  1096. this.WarehousingcurrentPage=1;
  1097. this.GoodsStorageList();
  1098. },
  1099. //入库审核列表
  1100. GoodsStorageList(val){
  1101. var url = "/api/PersonnelModule/GoodsStorageList"
  1102. var that = this
  1103. this.$axios({
  1104. method: 'post',
  1105. url: url,
  1106. headers: {
  1107. Authorization: 'Bearer '+ that.token
  1108. },
  1109. data:{
  1110. portType:1,
  1111. pageIndex:that.WarehousingcurrentPage,
  1112. pageSize:that.Warehousingpagesize,
  1113. goodsId:that.WarehousingTypes==""?0:that.WarehousingTypes,
  1114. currUserId:that.Userid,
  1115. auditLabel:that.WarehousingStatus+'',
  1116. goodsName:that.Warehousingname,
  1117. batchNo:'',
  1118. }
  1119. }).then(function (res) {
  1120. that.WarehousingData=[];
  1121. if (res.data.code == 200) {
  1122. that.WarehousingData=res.data.data;
  1123. that.Warehousingcount=res.data.count;
  1124. }
  1125. }).catch(function (error) {
  1126. that.$message.error("操作错误,联系信息部!");
  1127. });
  1128. },
  1129. //add物资类型切换
  1130. AddMaterialTypechange(val){
  1131. if(val==0){
  1132. this.AddMaterialinfoType="";
  1133. }
  1134. this.AddMaterialinfoTypearr=[];
  1135. for(let i=0;i<this.AddMaterialTypearr.length;i++){
  1136. if(this.AddMaterialType==this.AddMaterialTypearr[i].id){
  1137. this.AddMaterialinfoTypearr=this.AddMaterialTypearr[i].subTypeItems;
  1138. }
  1139. }
  1140. },
  1141. //入库导出
  1142. GoodsStorageExcelDownload(){
  1143. var url = "/api/PersonnelModule/GoodsStorageExcelDownload"
  1144. var that = this
  1145. this.$axios({
  1146. method: 'post',
  1147. url: url,
  1148. headers: {
  1149. Authorization: 'Bearer '+ that.token
  1150. },
  1151. }).then(function (res) {
  1152. if (res.data.code == 200) {
  1153. window.open(res.data.data.url);
  1154. that.$message({
  1155. type: 'success',
  1156. message: res.data.msg
  1157. });
  1158. }
  1159. }).catch(function (error) {
  1160. that.$message.error("操作错误,联系信息部!");
  1161. });
  1162. },
  1163. //获取列表
  1164. GoodsList() {
  1165. var url = "/api/PersonnelModule/GoodsList"
  1166. var that = this
  1167. this.$axios({
  1168. method: 'post',
  1169. url: url,
  1170. headers: {
  1171. Authorization: 'Bearer '
  1172. },
  1173. data: {
  1174. portType: 1,
  1175. pageIndex: that.currentPage,
  1176. pageSize: that.pagesize,
  1177. typeIds: that.MaterialinfoTypes,
  1178. goodsName: that.Materialname,
  1179. }
  1180. }).then(function (res) {
  1181. if (res.data.code == 200) {
  1182. that.count=res.data.count;
  1183. that.tableData=res.data.data;
  1184. }
  1185. }).catch(function (error) {
  1186. that.$message.error("操作错误,联系信息部!");
  1187. });
  1188. },
  1189. //分页
  1190. handleSizeChange(val) {
  1191. this.currentPage=1;
  1192. this.pagesize=val;
  1193. this.GoodsList();
  1194. },
  1195. handleCurrentChange(val) {
  1196. this.currentPage=val;
  1197. this.GoodsList();
  1198. },
  1199. WShandleSizeChange(val) {
  1200. this.WScurrentPage=1;
  1201. this.WSpagesize=val;
  1202. this.instorage({'id':this.ID});
  1203. },
  1204. WShandleCurrentChange(val) {
  1205. this.WScurrentPage=val;
  1206. this.instorage({'id':this.ID});
  1207. },
  1208. ClaimitemhandleSizeChange(val) {
  1209. this.ClaimitemcurrentPage=1;
  1210. this.Claimitempagesize=val;
  1211. this.GoodsReceiveList({'id':this.ID});
  1212. },
  1213. ClaimitemhandleCurrentChange(val) {
  1214. this.ClaimitemcurrentPage=val;
  1215. this.GoodsReceiveList({'id':this.ID});
  1216. },
  1217. ApprovalhandleSizeChange(val) {
  1218. this.ApprovalcurrentPage=1;
  1219. this.Approvalpagesize=val;
  1220. this.GoodsReceiveLists();
  1221. },
  1222. ApprovalhandleCurrentChange(val) {
  1223. this.ApprovalcurrentPage=val;
  1224. this.GoodsReceiveLists();
  1225. },
  1226. RSAuditSizeChange(val) {
  1227. this.RSAuditcurrentPage=1;
  1228. this.RSAuditpagesize=val;
  1229. this.RecordsGoodsReceiveList(false);
  1230. },
  1231. RSAuditCurrentChange(val) {
  1232. this.RSAuditcurrentPage=val;
  1233. this.RecordsGoodsReceiveList(false);
  1234. },
  1235. WarehousingSizeChange(val) {
  1236. this.WarehousingcurrentPage=1;
  1237. this.Warehousingpagesize=val;
  1238. this.GoodsStorageList();
  1239. },
  1240. WarehousingCurrentChange(val) {
  1241. this.WarehousingcurrentPage=val;
  1242. this.GoodsStorageList();
  1243. },
  1244. Warehousingwicket(){
  1245. this.Warehousingaudit=true;
  1246. this.GoodsStorageList();
  1247. },
  1248. //新增按钮
  1249. addbtnclick(){
  1250. this.ID=0;
  1251. this.AdditemsName="";
  1252. this.AddMaterialType="";
  1253. this.AddMaterialinfoType="";
  1254. this.Additemstextarea="";
  1255. this.unit="";
  1256. this.AddItemsVisible=true;
  1257. },
  1258. //入库审核
  1259. GoodsStorageConfirmStatusChange(val,type){
  1260. var auditDep=0
  1261. for (let i = 0; i < val.auditPers.length; i++) {
  1262. if (val.auditPers[i].auditPer==true) {
  1263. auditDep=val.auditPers[i].auditDep
  1264. }
  1265. }
  1266. if (auditDep==0) {
  1267. return this.$message.error('没有审核权限');
  1268. }
  1269. var url = "/api/PersonnelModule/GoodsStorageConfirmStatusChange"
  1270. var that = this
  1271. this.$axios({
  1272. method: 'post',
  1273. url: url,
  1274. headers: {
  1275. Authorization: 'Bearer ' +that.token
  1276. },
  1277. data:{
  1278. id:val.id,
  1279. auditDep:auditDep,
  1280. confirmStatus:type,
  1281. }
  1282. }).then(function (res) {
  1283. if (res.data.code == 200) {
  1284. that.$message({
  1285. type: 'success',
  1286. message: res.data.msg
  1287. });
  1288. that.GoodsStorageList();
  1289. }else{
  1290. that.$message.error(res.data.msg);
  1291. }
  1292. }).catch(function (error) {
  1293. that.$message.error("操作错误,联系信息部!");
  1294. });
  1295. },
  1296. //编辑
  1297. handleEdit(index,row){
  1298. console.log(row);
  1299. this.ID=row.id;
  1300. var url = "/api/PersonnelModule/GoodsInfo?portType=1&id="+this.ID
  1301. var that = this
  1302. this.$axios({
  1303. method: 'get',
  1304. url: url,
  1305. headers: {
  1306. Authorization: 'Bearer '
  1307. }
  1308. }).then(function (res) {
  1309. if (res.data.code == 200) {
  1310. var datainfo=res.data.data;
  1311. that.Additemstextarea=datainfo.remark;
  1312. that.AdditemsName=datainfo.name;
  1313. that.AddMaterialType=datainfo.parentType;
  1314. that.unit=datainfo.unit;
  1315. that.AddMaterialinfoType=datainfo.type;
  1316. that.AddItemsVisible=true;
  1317. that.AddMaterialTypechange(2);
  1318. }else{
  1319. that.$message.error(res.data.msg);
  1320. }
  1321. }).catch(function (error) {
  1322. that.$message.error("操作错误,联系信息部!");
  1323. });
  1324. },
  1325. //删除
  1326. handleDelete(index,row){
  1327. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  1328. confirmButtonText: '确定',
  1329. cancelButtonText: '取消',
  1330. type: 'warning'
  1331. }).then(() => {
  1332. var url = "/api/PersonnelModule/GoodsDel/"+row.id
  1333. var that = this
  1334. this.$axios({
  1335. method: 'delete',
  1336. url: url,
  1337. headers: {
  1338. Authorization: 'Bearer ' +that.token
  1339. }
  1340. }).then(function (res) {
  1341. if (res.data.code == 200) {
  1342. that.$message({
  1343. type: 'success',
  1344. message: res.data.msg
  1345. });
  1346. that.GoodsList();
  1347. }else{
  1348. that.$message.error(res.data.msg);
  1349. }
  1350. }).catch(function (error) {
  1351. that.$message.error("操作错误,联系信息部!");
  1352. });
  1353. }).catch(() => {
  1354. this.$message({
  1355. type: 'info',
  1356. message: '已取消删除'
  1357. });
  1358. });
  1359. },
  1360. //计算总价
  1361. Sumup(){
  1362. console.log(123);
  1363. this.warehousingsruleForm.totalPrice=this.warehousingsruleForm.quantity*this.warehousingsruleForm.unitPrice;
  1364. },
  1365. //新增物品api
  1366. GoodsOP() {
  1367. var url = "/api/PersonnelModule/GoodsOP"
  1368. var that = this
  1369. console.log(that.AdditemsName,that.AddMaterialinfoType,that.AddMaterialTypearr,that.unit);
  1370. if (that.AdditemsName==""||that.AddMaterialinfoType==""||that.AddMaterialType==""||that.unit=="") {
  1371. that.$message.error("检查是否填写完全!");
  1372. return
  1373. }
  1374. this.$axios({
  1375. method: 'post',
  1376. url: url,
  1377. headers: {
  1378. Authorization: 'Bearer ' +that.token
  1379. },
  1380. data: {
  1381. currUserId:that.Userid,
  1382. id:that.ID,
  1383. name:that.AdditemsName,
  1384. type:that.AddMaterialinfoType,
  1385. unit:that.unit,
  1386. remark:that.Additemstextarea,
  1387. }
  1388. }).then(function (res) {
  1389. if (res.data.code == 200) {
  1390. that.$message({
  1391. message:res.data.msg ,
  1392. type: 'success',
  1393. offset:50
  1394. });
  1395. that.AddItemsVisible=false;
  1396. that.GoodsList();
  1397. }else{
  1398. that.$message.error(res.data.msg);
  1399. }
  1400. }).catch(function (error) {
  1401. that.$message.error("操作错误,联系信息部!");
  1402. });
  1403. },
  1404. //入库数据初始化
  1405. rkcsh(){
  1406. this.warehousingsruleForm={
  1407. id:0,
  1408. quantity: 0,
  1409. unitPrice: 0,
  1410. totalPrice: 0,
  1411. supplierName: '',
  1412. supplierTel: '',
  1413. supplierAddress: '',
  1414. supplierSource: '',
  1415. storageUserId:'',
  1416. storageTime:'',
  1417. remark: ''
  1418. }
  1419. },
  1420. //入库列表
  1421. instorage(row){
  1422. this.rkcsh();
  1423. this.ID=row.id;
  1424. this.warehousingsVisible=true;
  1425. var url = "/api/PersonnelModule/GoodsStorageList"
  1426. var that = this
  1427. this.$axios({
  1428. method: 'POST',
  1429. url: url,
  1430. headers: {
  1431. Authorization: 'Bearer '
  1432. },
  1433. data:{
  1434. portType:1,
  1435. pageIndex:that.WScurrentPage,
  1436. pageSize:that.WSpagesize,
  1437. goodsId:row.id,
  1438. }
  1439. }).then(function (res) {
  1440. if (res.data.code == 200) {
  1441. that.WScount=res.data.count;
  1442. that.warehousingslist=res.data.data;
  1443. }else{
  1444. that.$message.error(res.data.msg);
  1445. }
  1446. }).catch(function (error) {
  1447. that.$message.error("操作错误,联系信息部!");
  1448. });
  1449. },
  1450. //入库api
  1451. GoodsStorageOP(){
  1452. var url = "/api/PersonnelModule/GoodsStorageOP"
  1453. var that = this
  1454. this.$axios({
  1455. method: 'POST',
  1456. url: url,
  1457. headers: {
  1458. Authorization: 'Bearer ' +that.token
  1459. },
  1460. data:{
  1461. id:that.warehousingsruleForm.id,
  1462. goodsId:that.ID,
  1463. quantity:that.warehousingsruleForm.quantity,
  1464. unitPrice:that.warehousingsruleForm.unitPrice,
  1465. totalPrice:that.warehousingsruleForm.totalPrice,
  1466. supplierName:that.warehousingsruleForm.supplierName,
  1467. supplierTel:that.warehousingsruleForm.supplierTel,
  1468. supplierAddress:that.warehousingsruleForm.supplierAddress,
  1469. supplierSource:that.warehousingsruleForm.supplierSource,
  1470. storageUserId:that.warehousingsruleForm.storageUserId,
  1471. storageTime:that.datetime(that.warehousingsruleForm.storageTime),
  1472. remark:that.warehousingsruleForm.remark,
  1473. }
  1474. }).then(function (res) {
  1475. if (res.data.code == 200) {
  1476. that.$message({
  1477. message:res.data.msg ,
  1478. type: 'success'
  1479. });
  1480. that.instorage({'id':that.ID});
  1481. that.resetForm('warehousingsruleForm');
  1482. that.GoodsList();
  1483. }else{
  1484. that.$message.error(res.data.msg);
  1485. }
  1486. }).catch(function (error) {
  1487. that.$message.error("操作错误,联系信息部!");
  1488. });
  1489. },
  1490. //编辑入库
  1491. Editentry(val){
  1492. var url = "/api/PersonnelModule/GoodsStorageInfo/"+val.id+"?portType=1"
  1493. var that = this
  1494. this.$axios({
  1495. method: 'get',
  1496. url: url,
  1497. headers: {
  1498. Authorization: 'Bearer '
  1499. }
  1500. }).then(function (res) {
  1501. if (res.data.code == 200) {
  1502. var datainfo=res.data.data;
  1503. that.warehousingsruleForm.id=datainfo.id;
  1504. that.warehousingsruleForm.quantity=datainfo.quantity;
  1505. that.warehousingsruleForm.unitPrice=datainfo.unitPrice;
  1506. that.warehousingsruleForm.totalPrice=datainfo.totalPrice;
  1507. that.warehousingsruleForm.supplierName=datainfo.supplierName;
  1508. that.warehousingsruleForm.supplierTel=datainfo.supplierTel;
  1509. that.warehousingsruleForm.supplierAddress=datainfo.supplierAddress;
  1510. that.warehousingsruleForm.supplierSource=datainfo.supplierSource;
  1511. that.warehousingsruleForm.storageUserId=datainfo.storageUserId;
  1512. that.warehousingsruleForm.storageTime=datainfo.storageTime;
  1513. that.warehousingsruleForm.remark=datainfo.remark;
  1514. }else{
  1515. that.$message.error(res.data.msg);
  1516. }
  1517. }).catch(function (error) {
  1518. that.$message.error("操作错误,联系信息部!");
  1519. });
  1520. },
  1521. //删除入裤
  1522. Deleteintolibrary(row){
  1523. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  1524. confirmButtonText: '确定',
  1525. cancelButtonText: '取消',
  1526. type: 'warning'
  1527. }).then(() => {
  1528. var url = "/api/PersonnelModule/GoodsStorageDel/"+row.id
  1529. var that = this
  1530. this.$axios({
  1531. method: 'delete',
  1532. url: url,
  1533. headers: {
  1534. Authorization: 'Bearer ' +that.token
  1535. }
  1536. }).then(function (res) {
  1537. if (res.data.code == 200) {
  1538. that.$message({
  1539. type: 'success',
  1540. message: res.data.msg
  1541. });
  1542. that.instorage({'id':that.ID});
  1543. }else{
  1544. that.$message.error(res.data.msg);
  1545. }
  1546. }).catch(function (error) {
  1547. that.$message.error("操作错误,联系信息部!");
  1548. });
  1549. }).catch(() => {
  1550. this.$message({
  1551. type: 'info',
  1552. message: '已取消删除'
  1553. });
  1554. });
  1555. },
  1556. //入库
  1557. submitForm(formName) {
  1558. this.$refs[formName].validate((valid) => {
  1559. if (valid) {
  1560. this.GoodsStorageOP();
  1561. } else {
  1562. return false;
  1563. }
  1564. });
  1565. },
  1566. resetForm(formName) {
  1567. this.warehousingsruleForm.id=0;
  1568. this.$refs[formName].resetFields();
  1569. },
  1570. //领用
  1571. ClaimsubmitForm(formName) {
  1572. this.$refs[formName].validate((valid) => {
  1573. if (valid) {
  1574. this.GoodsReceiveOP();
  1575. } else {
  1576. console.log('error submit!!');
  1577. return false;
  1578. }
  1579. });
  1580. },
  1581. ClaimresetForm(formName) {
  1582. this.Claimitemlabel="";
  1583. this.ClaimsruleForm.id=0;
  1584. this.$refs[formName].resetFields();
  1585. },
  1586. //审核状态切换
  1587. typevaluechange(){
  1588. this.GoodsReceiveLists()
  1589. },
  1590. //领用审核列表
  1591. GoodsReceiveLists(){
  1592. this.ApprovalData=[];
  1593. this.ApprovalVisible=true
  1594. var url = "/api/PersonnelModule/GoodsReceiveList"
  1595. var that = this
  1596. this.$axios({
  1597. method: 'POST',
  1598. url: url,
  1599. headers: {
  1600. Authorization: 'Bearer ' +that.token
  1601. },
  1602. data:{
  1603. portType:1,
  1604. pageIndex:that.ApprovalcurrentPage,
  1605. pageSize:that.Approvalpagesize,
  1606. goodsId:0,
  1607. userLabel:'',
  1608. goodsName:'',
  1609. beginDt:'',
  1610. endDt:'',
  1611. groupLabel:'',
  1612. typeLabel:'',
  1613. auditLabel:that.typevalue+'',
  1614. }
  1615. }).then(function (res) {
  1616. if (res.data.code == 200) {
  1617. that.ApprovalData=res.data.data;
  1618. that.Approvalcount=res.data.count;
  1619. }else{
  1620. that.$message.error(res.data.msg);
  1621. }
  1622. }).catch(function (error) {
  1623. that.$message.error("操作错误,联系信息部!");
  1624. });
  1625. },
  1626. //查询领用记录
  1627. inquireRecords(){
  1628. this.ReceiptRecord=true;
  1629. this.RecordsGoodsReceiveList(false);
  1630. },
  1631. //领用记录
  1632. RecordsGoodsReceiveList(isExcelDownload){
  1633. let groupID="";
  1634. for(let g=0;g<this.groupID.length;g++){
  1635. groupID+=this.groupID[g]+',';
  1636. }
  1637. groupID=groupID.substring(0, groupID.length - 1);
  1638. let personnelID="";
  1639. for (let p = 0; p < this.personnelID.length; p++) {
  1640. personnelID += this.personnelID[p]+',';
  1641. }
  1642. personnelID=personnelID.substring(0, personnelID.length - 1);
  1643. let RSAuditTypes="";
  1644. for (let r = 0; r < this.RSAuditTypes.length; r++) {
  1645. RSAuditTypes += this.RSAuditTypes[r]+",";
  1646. }
  1647. RSAuditTypes=RSAuditTypes.substring(0, RSAuditTypes.length - 1);
  1648. var url = "/api/PersonnelModule/GoodsReceiveList"
  1649. var that = this
  1650. this.$axios({
  1651. method: 'POST',
  1652. url: url,
  1653. headers: {
  1654. Authorization: 'Bearer ' +that.token
  1655. },
  1656. data:{
  1657. portType:1,
  1658. pageIndex:that.RSAuditcurrentPage,
  1659. pageSize:that.RSAuditpagesize,
  1660. goodsId:0,
  1661. userLabel:personnelID,
  1662. goodsName:that.RSAuditname,
  1663. beginDt:that.RSAudittime?that.datetimes(that.RSAudittime[0]):'',
  1664. endDt:that.RSAudittime?that.datetimes(that.RSAudittime[1]):'',
  1665. groupLabel:groupID,
  1666. typeLabel:RSAuditTypes,
  1667. auditLabel:that.RSAuditStatus+"",
  1668. isExcelDownload:isExcelDownload,
  1669. }
  1670. }).then(function (res) {
  1671. if (res.data.code == 200) {
  1672. let Datalist=res.data;
  1673. if (isExcelDownload==true) {
  1674. window.open(Datalist.data.url)
  1675. return
  1676. }
  1677. that.RSAuditData=Datalist.data;
  1678. that.RSAuditcount=Datalist.count;
  1679. }else{
  1680. that.$message.error(res.data.msg);
  1681. }
  1682. }).catch(function (error) {
  1683. that.$message.error("操作错误,联系信息部!");
  1684. });
  1685. },
  1686. //领用列表
  1687. GoodsReceiveList(row){
  1688. this.Claimitemlabel="";
  1689. if(row.stockQuantity<=0){
  1690. this.$message.error("已无库存!");
  1691. return
  1692. }
  1693. this.bjcsh();
  1694. this.ClaimitemData=[];
  1695. this.ID=row.id;
  1696. this.ClaimitemVisible=true;
  1697. var url = "/api/PersonnelModule/GoodsReceiveList"
  1698. var that = this
  1699. this.$axios({
  1700. method: 'POST',
  1701. url: url,
  1702. headers: {
  1703. Authorization: 'Bearer ' +that.token
  1704. },
  1705. data:{
  1706. portType:1,
  1707. pageIndex:that.ClaimitemcurrentPage,
  1708. pageSize:that.Claimitempagesize,
  1709. goodsId:row.id,
  1710. userLabel:that.Userid+'',
  1711. goodsName:'',
  1712. beginDt:'',
  1713. endDt:'',
  1714. groupLabel:'',
  1715. typeLabel:'',
  1716. auditLabel:'',
  1717. isExcelDownload:false,
  1718. }
  1719. }).then(function (res) {
  1720. if (res.data.code == 200) {
  1721. that.ClaimitemData=res.data.data;
  1722. that.Claimitemcount=res.data.count;
  1723. }else{
  1724. that.$message.error(res.data.msg);
  1725. }
  1726. }).catch(function (error) {
  1727. that.$message.error("操作错误,联系信息部!");
  1728. });
  1729. },
  1730. //领用api
  1731. GoodsReceiveOP(){
  1732. var url = "/api/PersonnelModule/GoodsReceiveOP"
  1733. var that = this
  1734. this.$axios({
  1735. method: 'POST',
  1736. url: url,
  1737. headers: {
  1738. Authorization: 'Bearer ' +that.token
  1739. },
  1740. data:{
  1741. id:that.ClaimsruleForm.id,
  1742. groupId:that.ClaimsruleForm.groupId,
  1743. goodsId:that.ID,
  1744. quantity:that.ClaimsruleForm.quantity,
  1745. reason:that.ClaimsruleForm.reason,
  1746. remark:that.ClaimsruleForm.remark,
  1747. }
  1748. }).then(function (res) {
  1749. if (res.data.code == 200) {
  1750. that.$message({
  1751. type: 'success',
  1752. message: res.data.msg
  1753. });
  1754. that.ClaimresetForm("ClaimsruleForm");
  1755. that.GoodsReceiveList({'id':that.ID});
  1756. }else{
  1757. that.$message.error(res.data.msg);
  1758. }
  1759. }).catch(function (error) {
  1760. that.$message.error("操作错误,联系信息部!");
  1761. });
  1762. },
  1763. //编辑初始化
  1764. bjcsh(){
  1765. this.ClaimsruleForm={
  1766. id:0,
  1767. groupId:'',
  1768. quantity:0,
  1769. reason:'',
  1770. remark:'',
  1771. }
  1772. },
  1773. //编辑领用
  1774. Editentryreceive(val){
  1775. var url = "/api/PersonnelModule/GoodsReceiveInfo/"+val.id+"?portType=1"
  1776. var that = this
  1777. this.$axios({
  1778. method: 'get',
  1779. url: url,
  1780. headers: {
  1781. Authorization: 'Bearer ' +that.token
  1782. }
  1783. }).then(function (res) {
  1784. if (res.data.code == 200) {
  1785. var datainfo=res.data.data;
  1786. that.ClaimsruleForm.id=datainfo.id;
  1787. that.ClaimsruleForm.groupId=datainfo.groupId;
  1788. that.ClaimsruleForm.quantity=datainfo.quantity;
  1789. that.ClaimsruleForm.reason=datainfo.reason;
  1790. that.ClaimsruleForm.remark=datainfo.remark;
  1791. that.Claimitemlabel=datainfo.goodsStorageInfoStr;
  1792. }else{
  1793. that.$message.error(res.data.msg);
  1794. }
  1795. }).catch(function (error) {
  1796. that.$message.error("操作错误,联系信息部!");
  1797. });
  1798. },
  1799. //审核列表删除
  1800. Deleteintolibraryreceives(row){
  1801. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  1802. confirmButtonText: '确定',
  1803. cancelButtonText: '取消',
  1804. type: 'warning'
  1805. }).then(() => {
  1806. var url = "/api/PersonnelModule/GoodsReceiveDel/"+row.id
  1807. var that = this
  1808. this.$axios({
  1809. method: 'delete',
  1810. url: url,
  1811. headers: {
  1812. Authorization: 'Bearer ' +that.token
  1813. }
  1814. }).then(function (res) {
  1815. if (res.data.code == 200) {
  1816. that.$message({
  1817. type: 'success',
  1818. message: res.data.msg
  1819. });
  1820. that.GoodsReceiveLists();
  1821. }else{
  1822. that.$message.error(res.data.msg);
  1823. }
  1824. }).catch(function (error) {
  1825. that.$message.error("操作错误,联系信息部!");
  1826. });
  1827. }).catch(() => {
  1828. this.$message({
  1829. type: 'info',
  1830. message: '已取消删除'
  1831. });
  1832. });
  1833. },
  1834. //删除领用
  1835. Deleteintolibraryreceive(row){
  1836. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  1837. confirmButtonText: '确定',
  1838. cancelButtonText: '取消',
  1839. type: 'warning'
  1840. }).then(() => {
  1841. var url = "/api/PersonnelModule/GoodsReceiveDel/"+row.id
  1842. var that = this
  1843. this.$axios({
  1844. method: 'delete',
  1845. url: url,
  1846. headers: {
  1847. Authorization: 'Bearer ' +that.token
  1848. }
  1849. }).then(function (res) {
  1850. if (res.data.code == 200) {
  1851. that.$message({
  1852. type: 'success',
  1853. message: res.data.msg
  1854. });
  1855. that.GoodsReceiveList({'id':that.ID});
  1856. }else{
  1857. that.$message.error(res.data.msg);
  1858. }
  1859. }).catch(function (error) {
  1860. that.$message.error("操作错误,联系信息部!");
  1861. });
  1862. }).catch(() => {
  1863. this.$message({
  1864. type: 'info',
  1865. message: '已取消删除'
  1866. });
  1867. });
  1868. },
  1869. //审核领用
  1870. GoodsReceiveAudit(row,val){
  1871. var url = "/api/PersonnelModule/GoodsReceiveAudit"
  1872. var that = this
  1873. this.$axios({
  1874. method: 'post',
  1875. url: url,
  1876. headers: {
  1877. Authorization: 'Bearer ' +that.token
  1878. },
  1879. data:{
  1880. label:row+'',
  1881. auditEnum:val,
  1882. }
  1883. }).then(function (res) {
  1884. if (res.data.code == 200) {
  1885. that.$message({
  1886. type: 'success',
  1887. message: res.data.msg
  1888. });
  1889. that.GoodsReceiveLists();
  1890. if(that.tableData.length>0){
  1891. that.GoodsList();
  1892. }
  1893. }else{
  1894. that.$message.error(res.data.msg);
  1895. }
  1896. }).catch(function (error) {
  1897. that.$message.error("操作错误,联系信息部!");
  1898. });
  1899. },
  1900. },
  1901. mounted(){
  1902. //权限
  1903. let authData=JSON.parse(localStorage.getItem('userinif')).authData;
  1904. let Permissions=[];
  1905. for(let k=0;k<authData.length;k++){
  1906. for(let m=0;m<authData[k].pageList.length;m++){
  1907. if (authData[k].pageList[m].webUrl=='/SuppliesInventory') {
  1908. Permissions=authData[k].pageList[m].pageAuth;
  1909. }
  1910. }
  1911. }
  1912. for (let r = 0; r < Permissions.length; r++) {
  1913. if (Permissions[r].funid==12) {
  1914. this.Auditauthority=true;
  1915. }
  1916. if (Permissions[r].funid==3) {
  1917. this.Editpermission=true;
  1918. }
  1919. if (Permissions[r].funid==11) {
  1920. this.Addpermission=true;
  1921. }
  1922. if (Permissions[r].funid==2) {
  1923. this.Deletepermission=true;
  1924. }
  1925. }
  1926. this.Userid=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
  1927. this.token=JSON.parse(localStorage.getItem('userinif')).token;
  1928. this.GoodsInitDataSource();
  1929. }
  1930. }
  1931. </script>
  1932. <style>
  1933. .SuppliesInventory-all {
  1934. background-color: #fff;
  1935. padding: 10px;
  1936. box-shadow: 0 0 5px #0005;
  1937. border-radius: 10px;
  1938. min-height: 830px;
  1939. min-width: 1535px;
  1940. }
  1941. .SuppliesInventory-head{
  1942. display: flex;
  1943. justify-content: space-between;
  1944. }
  1945. .SuppliesInventory-head-li{
  1946. margin-right: 15px;
  1947. }
  1948. .SuppliesInventory-head-li label{
  1949. font-size: 14px;
  1950. color: #555;
  1951. }
  1952. .SuppliesInventory-table{
  1953. margin-top: 15px;
  1954. }
  1955. .SuppliesInventory-head-ul{
  1956. display: flex;
  1957. }
  1958. .additems-li{
  1959. margin-bottom: 10px;
  1960. }
  1961. .additems-btn{
  1962. text-align: right;
  1963. margin-top: 20px;
  1964. }
  1965. .warehousingsrule-input{
  1966. display: flex;
  1967. flex-wrap: wrap;
  1968. justify-content: space-between;
  1969. }
  1970. .warehousingsrule-input .el-form-item{
  1971. width: 33%;
  1972. }
  1973. .warehousingsrule-input .el-input-number{
  1974. width: 100%;
  1975. }
  1976. .warehousingsrule-input .el-form-item{
  1977. margin-bottom: 10px;
  1978. }
  1979. .warehousingsrule-input .el-form-item__error{
  1980. top: 82%;
  1981. }
  1982. .warehousingsrule-input .el-select{
  1983. width: 100%;
  1984. }
  1985. .warehousingsrule-table .el-table th.el-table__cell>.cell{
  1986. text-align: center;
  1987. font-size: 12px;
  1988. }
  1989. .warehousingsrule-table .el-table td.el-table__cell div{
  1990. font-size: 12px;
  1991. }
  1992. .SuppliesInventory-table .block{
  1993. text-align: center;
  1994. margin-top: 10px;
  1995. }
  1996. .warehousingsrule-table .block{
  1997. text-align: center;
  1998. margin-top: 10px;
  1999. }
  2000. .additems-li label{
  2001. display: inline-block;
  2002. width: 105px;
  2003. }
  2004. .Claimitem-input{
  2005. display: flex;
  2006. flex-wrap: wrap;
  2007. justify-content: space-between;
  2008. }
  2009. .Claimitem-input .el-form-item{
  2010. width: 33%;
  2011. }
  2012. .Claimitem-input .el-input-number{
  2013. width: 100%;
  2014. }
  2015. .Claimitem-input .el-form-item{
  2016. margin-bottom: 10px;
  2017. }
  2018. .Claimitem-input .el-form-item__error{
  2019. top: 82%;
  2020. }
  2021. .claimitem-table .el-table th.el-table__cell>.cell{
  2022. text-align: center;
  2023. font-size: 12px;
  2024. }
  2025. .claimitem-table .el-table td.el-table__cell div{
  2026. font-size: 12px;
  2027. }
  2028. .claimitem-table .block{
  2029. text-align: center;
  2030. margin-top: 10px;
  2031. }
  2032. .Approval-table .el-table th.el-table__cell>.cell{
  2033. text-align: center;
  2034. font-size: 12px;
  2035. }
  2036. .Approval-table .el-table td.el-table__cell div{
  2037. font-size: 12px;
  2038. }
  2039. .Approval-table .block{
  2040. text-align: center;
  2041. margin-top: 10px;
  2042. }
  2043. .ReceiptRecord-table .el-table th.el-table__cell>.cell{
  2044. text-align: center;
  2045. font-size: 12px;
  2046. }
  2047. .ReceiptRecord-table .el-table td.el-table__cell div{
  2048. font-size: 12px;
  2049. }
  2050. .ReceiptRecord-table .block{
  2051. text-align: center;
  2052. margin-top: 10px;
  2053. }
  2054. .Approval-dialog .el-dialog__body{
  2055. padding-top: 0px;
  2056. }
  2057. .ReceiptRecord-search{
  2058. display: flex;
  2059. }
  2060. .ReceiptRecord-search-li label{
  2061. margin-left: 10px;
  2062. }
  2063. .ReceiptRecord-table{
  2064. margin-top: 15px;
  2065. }
  2066. .ReceiptRecord-search .el-range-editor.el-input__inner{
  2067. margin-bottom:0;
  2068. }
  2069. .warehousingaudit-search{
  2070. display: flex;
  2071. }
  2072. .warehousingaudit-search-li label{
  2073. margin-left: 10px;
  2074. }
  2075. .warehousingaudit-search .el-range-editor.el-input__inner{
  2076. margin-bottom:0;
  2077. }
  2078. .warehousingaudit-table{
  2079. margin-top: 15px;
  2080. }
  2081. .warehousingaudit-table .block{
  2082. text-align: center;
  2083. }
  2084. </style>