Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

stockOutOrderEdit.vue 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
  5. <bread-crumb v-if="this.$route.query.type == 2" :crumbs='crumbs2'></bread-crumb>
  6. <div style="float:right;">
  7. <el-button size="small" @click="back()" class="filter-item">取 消</el-button>
  8. <el-button size="small" type="primary" @click="submit()" class="filter-item">保 存</el-button>
  9. </div>
  10. </div>
  11. <div class="app-container">
  12. <stock-in-dialog
  13. ref="dialog"
  14. :propForm="propForm"
  15. :visibility="isVisibility"
  16. v-on:dialog-comfirm="comfirm"
  17. v-on:dialog-cancle="cancle"
  18. >
  19. </stock-in-dialog>
  20. <div class="cell clearfix">
  21. <label class="title"><span class="name">出库时间</span> : </label>
  22. <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
  23. style="width: 200px;"
  24. type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
  25. value-format="yyyy-MM-dd"></el-date-picker>
  26. </div>
  27. <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
  28. <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
  29. max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
  30. >
  31. <el-table-column width="200" align="center">
  32. <template slot="header" slot-scope="scope">
  33. <span>耗材名称</span>
  34. </template>
  35. <template slot-scope="scope">
  36. <el-form-item style="padding-top: 20px">
  37. <el-autocomplete
  38. class="checkSearch"
  39. popper-class="my-autocomplete"
  40. v-model="scope.row.good_name"
  41. :fetch-suggestions="querySearchAsync"
  42. :trigger-on-focus="true"
  43. placeholder="请输入耗材名称"
  44. @select="handleSelect"
  45. @input="changeGoodName(scope.$index)"
  46. style="width:150px;"
  47. :disabled="stockShow"
  48. >
  49. <i class="el-icon-search el-input__icon" slot="suffix"></i>
  50. <template slot-scope="{ item }">
  51. <div class="name">{{item.good_name +" " +item.specification_name + " "+ item.manufacturer}}</div>
  52. </template>
  53. </el-autocomplete>
  54. </el-form-item>
  55. </template>
  56. </el-table-column>
  57. <el-table-column width="140" align="center">
  58. <template slot="header" slot-scope="scope">
  59. <span>耗材类型<span style="color: red">*</span></span>
  60. </template>
  61. <template slot-scope="scope">
  62. <el-form-item style="padding-top: 20px">
  63. <el-input
  64. :disabled="stockShow"
  65. placeholder="请输入商品类型"
  66. v-model="scope.row.good_type_id"
  67. :value="typeName(scope.row.good_type_id)"
  68. ></el-input>
  69. </el-form-item>
  70. </template>
  71. </el-table-column>
  72. <el-table-column width="140" align="center">
  73. <template slot="header" slot-scope="scope">
  74. <span>规格&单位<span style="color: red">*</span></span>
  75. </template>
  76. <template slot-scope="scope">
  77. <el-form-item style="padding-top: 20px">
  78. <el-input v-model="scope.row.name" :disabled="stockShow"></el-input>
  79. </el-form-item>
  80. </template>
  81. </el-table-column>
  82. <el-table-column width="140" align="center">
  83. <template slot="header" slot-scope="scope">
  84. <span>批号<span style="color: red"></span></span>
  85. </template>
  86. <template slot-scope="scope">
  87. <el-form-item style="padding-top: 20px">
  88. <!-- <el-input placeholder="请输入批号" v-model="scope.row.number" :disabled="stockShow"></el-input> -->
  89. <el-select v-model="scope.row.number" filterable placeholder="请选择" :disabled="stockTrue">
  90. <el-option
  91. v-for="(item,index) in numberList"
  92. :key="index"
  93. :label="item.number"
  94. :value="item.number">
  95. </el-option>
  96. </el-select>
  97. </el-form-item>
  98. </template>
  99. </el-table-column>
  100. <el-table-column width="150" align="center">
  101. <template slot="header" slot-scope="scope">
  102. <span>单价<span style="color: red">*</span></span>
  103. </template>
  104. <template slot-scope="scope">
  105. <!--<el-input type="number" v-model="scope.row.price" @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
  106. <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
  107. style="padding-top: 17px">
  108. <el-input type="number" v-model="scope.row.price" :disabled="stockShow"></el-input>
  109. </el-form-item>
  110. </template>
  111. </el-table-column>
  112. <el-table-column width="150" align="center">
  113. <template slot="header" slot-scope="scope">
  114. <span>出库数量<span style="color: red">*</span></span>
  115. </template>
  116. <template slot-scope="scope">
  117. <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
  118. style="padding-top: 17px">
  119. <el-input type="number" v-model="scope.row.count" :disabled="stockShow"></el-input>
  120. </el-form-item>
  121. </template>
  122. </el-table-column>
  123. <el-table-column label="总价" width="150" align="center">
  124. <template slot-scope="scope">
  125. {{calculate(scope.row.price*scope.row.count)}}
  126. </template>
  127. </el-table-column>
  128. <el-table-column label="生产厂商" width="150" align="center">
  129. <template slot-scope="scope">
  130. <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商" :disabled="stockShow">
  131. <el-option
  132. v-for="(option, index) in manufacturerList"
  133. :key="index"
  134. :label="option.manufacturer_name"
  135. :value="option.id">
  136. </el-option>
  137. </el-select>
  138. </template>
  139. </el-table-column>
  140. <el-table-column label="生产日期" width="150" align="center">
  141. <template slot-scope="scope">
  142. <el-date-picker
  143. :disabled="stockShow"
  144. prefix-icon="el-icon-date"
  145. style="width: 145px"
  146. v-model="scope.row.product_date"
  147. type="date"
  148. placeholder="选择日期时间"
  149. format="yyyy-MM-dd"
  150. value-format="yyyy-MM-dd"
  151. ></el-date-picker>
  152. </template>
  153. </el-table-column>
  154. <el-table-column label="有效期" width="150" align="center">
  155. <template slot-scope="scope">
  156. <el-date-picker
  157. :disabled="stockShow"
  158. prefix-icon="el-icon-date"
  159. style="width: 145px"
  160. v-model="scope.row.expiry_date"
  161. type="date"
  162. placeholder="选择日期时间"
  163. format="yyyy-MM-dd"
  164. value-format="yyyy-MM-dd"
  165. ></el-date-picker>
  166. </template>
  167. </el-table-column>
  168. <el-table-column width="150" align="center">
  169. <template slot="header" slot-scope="scope">
  170. <span>批准文号<span style="color: red"></span></span>
  171. </template>
  172. <template slot-scope="scope">
  173. <el-input placeholder="请输入批准文号" v-model="scope.row.license_number" ></el-input>
  174. </template>
  175. </el-table-column>
  176. <el-table-column label="经销商" width="150" align="center">
  177. <template slot-scope="scope">
  178. <el-select size="small" v-model="scope.row.dealer" filterable placeholder="请选择厂商" :disabled="stockShow">
  179. <el-option
  180. v-for="(option, index) in dealerList"
  181. :key="index"
  182. :label="option.dealer_name"
  183. :value="option.id">
  184. </el-option>
  185. </el-select>
  186. </template>
  187. </el-table-column>
  188. <el-table-column label="备注" width="150" align="center">
  189. <template slot-scope="scope">
  190. <el-input v-model="scope.row.remark" :disabled="stockShow"></el-input>
  191. </template>
  192. </el-table-column>
  193. <el-table-column label="操作" align="center" width="150" fixed="right">
  194. <template slot-scope="scope">
  195. <el-tooltip class="item" effect="dark" content="新增" placement="top">
  196. <el-button
  197. size="mini"
  198. type="primary"
  199. icon="el-icon-circle-plus-outline"
  200. @click="handleEdit(scope.$index, scope.row)">
  201. </el-button>
  202. </el-tooltip>
  203. <el-tooltip class="item" effect="dark" content="删除" placement="top">
  204. <el-button
  205. size="mini"
  206. type="danger"
  207. icon="el-icon-delete"
  208. @click="handleDelete(scope.$index, scope.row)">
  209. </el-button>
  210. </el-tooltip>
  211. </template>
  212. </el-table-column>
  213. </el-table>
  214. </el-form>
  215. </div>
  216. </div>
  217. </template>
  218. <script>
  219. import { uParseTime } from '@/utils/tools'
  220. import { deleteWarehouseOutInfo, editWarehouseoutInfo, getSalesReturnConfig, getWarehouseOutInfo,GetAllConfig,GetAllGoodInfoByID,postSearchGoodList,getSingleOutOrderDetail,getStockBatchNumber } from '@/api/stock'
  221. import BreadCrumb from '../components/bread-crumb'
  222. import StockInDialog from './Dialog/stockInDialog'
  223. export default {
  224. components: { StockInDialog, BreadCrumb},
  225. name: 'stockOutOrderEdit',
  226. data() {
  227. return {
  228. crumbs: [
  229. { path: false, name: '库存管理' },
  230. { path: false, name: '耗材出库单' },
  231. { path: false, name: '编辑出库单' }
  232. ],
  233. crumbs2: [
  234. { path: false, name: '库存管理' },
  235. { path: false, name: '其他出库单' },
  236. { path: false, name: '编辑出库单' }
  237. ],
  238. signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
  239. adminUserOptions: null,
  240. currentIndex: 0,
  241. warehouse_out_time: '',
  242. recordInfo: {
  243. recordData: [],
  244. stock_in_code: '',
  245. current_index: ''
  246. },
  247. tableRules: {
  248. count: [
  249. { required: true, message: '数量不能为空', trigge: 'blur' }
  250. ],
  251. price: [
  252. { required: true, message: '单价不能为空', trigger: 'blur' }
  253. ]
  254. },
  255. ruleForm: {
  256. manufacturer: [
  257. { required: true, message: '请选择厂商', trigger: 'change' }
  258. ]
  259. },
  260. // prop
  261. isVisibility: false,
  262. propForm: {
  263. goods:[],
  264. goodType: [],
  265. goodInfo: [],
  266. goodUnit: [],
  267. title: '入库',
  268. manufacturer: 0,
  269. dealer: 0
  270. },
  271. form: {
  272. manufacturer: 0,
  273. dealer: 0
  274. },
  275. warehouseInfoList: [],
  276. warehouseOut: {},
  277. manufacturer: [],
  278. dealer: [],
  279. goodType: [],
  280. goodInfo:[],
  281. numberList:[],
  282. stockShow:false,
  283. stockTrue:true,
  284. }
  285. },
  286. methods: {
  287. comfirm: function(val) {
  288. this.$refs.dialog.hide();
  289. this.propForm.goodType = [];
  290. this.propForm.goods = [];
  291. if (val.selectedGoodInfo.length > 0) {
  292. for (let i = val.selectedGoodInfo.length - 1; ; i--) {
  293. if (i == 0) {
  294. this.recordInfo.recordData[this.currentIndex].good_type_id =
  295. val.selectedGoodInfo[i].good_type_id;
  296. this.recordInfo.recordData[this.currentIndex].good_id =
  297. val.selectedGoodInfo[i].id;
  298. this.recordInfo.recordData[
  299. this.currentIndex
  300. ].price = val.selectedGoodInfo[i].buy_price.toString();
  301. } else {
  302. const tempForm = {};
  303. tempForm["id"] = 0;
  304. tempForm["good_type_id"] = val.selectedGoodInfo[i].good_type_id;
  305. tempForm["good_id"] = val.selectedGoodInfo[i].id;
  306. tempForm["count"] = "";
  307. tempForm["price"] = val.selectedGoodInfo[i].buy_price.toString();
  308. tempForm["remark"] = "";
  309. this.recordInfo.recordData.splice(
  310. this.currentIndex + 1,
  311. 0,
  312. tempForm
  313. );
  314. }
  315. }
  316. }
  317. this.currentIndex = -1;
  318. },
  319. cancle: function() {
  320. this.$refs.dialog.hide()
  321. this.propForm.goods = [];
  322. this.propForm.goodType = [];
  323. },
  324. GetConfigInfo: function() {
  325. const loading = this.$loading({
  326. lock: true,
  327. text: "Loading",
  328. spinner: "el-icon-loading",
  329. background: "rgba(0, 0, 0, 0.7)"
  330. });
  331. GetAllConfig().then(response => {
  332. if (response.data.state == 0) {
  333. this.$message.error(response.data.msg);
  334. return false;
  335. } else {
  336. this.manufacturerList = response.data.data.manufacturer;
  337. this.dealer = response.data.data.dealer;
  338. this.goodType = response.data.data.goodType;
  339. this.goodInfo = response.data.data.goodInfo;
  340. }
  341. loading.close();
  342. });
  343. }, typeName: function(good_type_id) {
  344. let name = "";
  345. for (let i = 0; i < this.goodType.length; i++) {
  346. if (this.goodType[i].id == good_type_id) {
  347. name = this.goodType[i].type_name;
  348. }
  349. }
  350. return name;
  351. }, specificationName: function(good_info_id) {
  352. let name = "";
  353. for (let i = 0; i < this.goodInfo.length; i++) {
  354. if (this.goodInfo[i].id == good_info_id) {
  355. name = this.goodInfo[i].specification_name;
  356. }
  357. }
  358. return name;
  359. },
  360. handleEdit: function(index, row) {
  361. this.stockTrue = false
  362. if(this.stockShow == true){
  363. this.$message.error("自动出库数据无法编辑")
  364. return
  365. }
  366. const tempObj = {}
  367. tempObj['id'] = 0
  368. tempObj['good_type_id'] = 0
  369. tempObj['good_id'] = 0
  370. tempObj['count'] = ''
  371. tempObj['price'] = ''
  372. tempObj['remark'] = ''
  373. tempObj['number'] = ""
  374. tempObj['license_number'] = ""
  375. tempObj['dealer'] = ""
  376. tempObj['manufacturer'] = ""
  377. this.recordInfo.recordData.push(tempObj)
  378. },
  379. handleDelete: function(index, row) {
  380. if(this.stockShow == true){
  381. this.$message.error("自动出库数据无法删除")
  382. return
  383. }
  384. if (row.id == 0) {
  385. this.recordInfo.recordData.splice(index, 1)
  386. } else {
  387. const params = {
  388. id: row.id
  389. }
  390. this.$confirm('确认删除该出库耗材信息记录?', '删除出库耗材信息记录', {
  391. confirmButtonText: '确定',
  392. cancelButtonText: '取消',
  393. type: 'warning'
  394. }).then(() => {
  395. deleteWarehouseOutInfo(params).then(response => {
  396. if (response.data.state == 0) {
  397. this.$message.error(response.data.msg)
  398. return false
  399. } else {
  400. this.$message.success('删除成功')
  401. this.recordInfo.recordData.splice(index, 1)
  402. }
  403. })
  404. }).catch(() => {
  405. })
  406. }
  407. }, getTime(val, temp) {
  408. if (val != 0) {
  409. return uParseTime(val, temp)
  410. } else {
  411. return ''
  412. }
  413. },
  414. showDialog(index, row) {
  415. this.currentIndex = index;
  416. const loading = this.$loading({
  417. lock: true,
  418. text: "Loading",
  419. spinner: "el-icon-loading",
  420. background: "rgba(0, 0, 0, 0.7)"
  421. });
  422. const params = {
  423. manufacturer_id: this.form.manufacturer,
  424. dealer_id: this.form.dealer
  425. };
  426. this.propForm.goods = []
  427. GetAllGoodInfoByID(params).then(response => {
  428. if (response.data.state == 0) {
  429. this.$message.error(response.data.msg);
  430. return false;
  431. } else {
  432. if (response.data.data.goodInfo.length <= 0) {
  433. this.$message.error("该厂商或经销商没有物品信息");
  434. return;
  435. }
  436. this.$refs.dialog.show();
  437. for (let i = 0; i < response.data.data.goodInfo.length; i++) {
  438. this.propForm.goodType.push(
  439. response.data.data.goodInfo[i].type
  440. );
  441. }
  442. const obj = {};
  443. this.propForm.goodType = this.propForm.goodType.reduce(
  444. (cur, next) => {
  445. obj[next.id] ? "" : (obj[next.id] = true && cur.push(next));
  446. return cur;
  447. },
  448. []
  449. ); // 设置cur默认类型为数组,并且初始值为空的数组
  450. }
  451. for (let i = 0; i < this.propForm.goodType.length; i++) {
  452. let goodInfo = [];
  453. let goodObj = {};
  454. for (let a = 0; a < response.data.data.goodInfo.length; a++) {
  455. var respObj = response.data.data.goodInfo[a];
  456. respObj["isSelected"] = false;
  457. if (respObj.type.id == this.propForm.goodType[i].id) {
  458. goodInfo.push(respObj);
  459. }
  460. }
  461. const obj = {};
  462. goodInfo = goodInfo.reduce((cur, next) => {
  463. obj[next.id] ? "" : (obj[next.id] = true && cur.push(next));
  464. return cur;
  465. }, []); // 设置cur默认类型为数组,并且初始值为空的数组
  466. this.$set(goodObj, this.propForm.goodType[i].id, goodInfo);
  467. this.propForm.goods.push(goodObj);
  468. }
  469. loading.close();
  470. });
  471. },
  472. back() {
  473. this.$router.go(-1)
  474. },
  475. submit() {
  476. this.$refs['tableForm'].validate((valid) => {
  477. if (valid) {
  478. const array = this.recordInfo.recordData
  479. for (let i = 0; i < array.length; i++) {
  480. if (array[i].good_type_id == 0) {
  481. this.$message.error('商品类型不能为空')
  482. return
  483. }
  484. if (array[i].good_id == 0) {
  485. this.$message.error('规格名称不能为空')
  486. return
  487. }
  488. }
  489. for(let i=0;i<this.recordInfo.recordData.length;i++){
  490. if(this.recordInfo.recordData[i].dealer == ""){
  491. this.recordInfo.recordData[i].dealer = 0
  492. }
  493. if(this.recordInfo.recordData[i].expiry_date == "" || this.recordInfo.recordData[i].expiry_date == undefined){
  494. this.recordInfo.recordData[i].expiry_date = ""
  495. }
  496. if(this.recordInfo.recordData[i].product_date == "" || this.recordInfo.recordData[i].product_date == undefined){
  497. this.recordInfo.recordData[i].product_date = ""
  498. }
  499. this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
  500. for(let j=0;j<this.manufacturerList.length;j++){
  501. if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
  502. this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
  503. }
  504. }
  505. for(let z=0;z<this.dealerList.length;z++){
  506. if(this.recordInfo.recordData[i].dealer == this.dealerList[z].dealer_name){
  507. this.recordInfo.recordData[i].dealer = this.dealerList[z].id
  508. }
  509. }
  510. }
  511. const params = {
  512. 'stockOut': this.recordInfo.recordData
  513. }
  514. console.log("stockout",params,this.$route.query.id)
  515. editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
  516. if (response.data.state == 0) {
  517. this.$message.error(response.data.msg)
  518. return false
  519. } else {
  520. if(response.data.data.msg == 1){
  521. this.$message.success('保存成功')
  522. this.$router.back(-1)
  523. }
  524. if(response.data.data.msg == 5){
  525. this.$message.error("该耗材无库存,请入库")
  526. }
  527. if(response.data.data.msg == 6){
  528. this.$message.error("该耗材的退库数量大于入库数量,无法出库,请新增出库另一个批次")
  529. }
  530. }
  531. })
  532. } else {
  533. return false
  534. }
  535. })
  536. },
  537. calculate: function(val) {
  538. if (val == 0) {
  539. return ''
  540. }
  541. return Math.round(parseFloat(val) * 100) / 100
  542. }, changeManufacturer(val) {
  543. this.propForm.manufacturer = val
  544. }, changeDealer(val) {
  545. this.propForm.dealer = val
  546. },
  547. querySearchAsync(keyword, cb) {
  548. let key = '';
  549. if (keyword != undefined) {
  550. key = keyword
  551. }
  552. console.log("keyrowrd",key)
  553. postSearchGoodList(key).then(response => {
  554. if (response.data.state == 1) {
  555. var list = response.data.data.list
  556. this.goodList = list
  557. var manufacturerList = response.data.data.manufacturerList
  558. this.manufacturerList = manufacturerList
  559. for(let i=0;i<this.goodList.length;i++){
  560. for(let j=0;j<this.manufacturerList.length;j++){
  561. if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
  562. this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
  563. }
  564. }
  565. for(let z=0;z<this.dealerList.length;z++){
  566. if(this.goodList[i].dealer == this.dealerList[z].id){
  567. this.goodList[i].dealer = this.dealerList[z].dealer_name
  568. }
  569. }
  570. }
  571. cb(this.goodList)
  572. } else {
  573. cb([])
  574. }
  575. })
  576. },
  577. changeGoodName(val){
  578. this.currentIndex = val
  579. },
  580. handleSelect(val){
  581. console.log("val22222",val)
  582. this.getStockBatchNumber(val.id)
  583. for(let i=0;i<this.recordInfo.recordData.length;i++){
  584. if(this.currentIndex == i){
  585. this.recordInfo.recordData[i].good_type_id = val.id
  586. this.recordInfo.recordData[i].good_name = val.good_name
  587. this.recordInfo.recordData[i].good_type_id = val.good_type_id
  588. this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
  589. this.recordInfo.recordData[i].manufacturer = val.manufacturer
  590. this.recordInfo.recordData[i].remark = val.remark
  591. this.recordInfo.recordData[i].license_number = ""
  592. if(val.packing_price == 0){
  593. this.recordInfo.recordData[i].price = ""
  594. }else{
  595. this.recordInfo.recordData[i].price = val.packing_price
  596. }
  597. this.recordInfo.recordData[i].specification_name = val.specification_name
  598. this.recordInfo.recordData[i].good_id = val.id
  599. if(val.dealer == 0){
  600. this.recordInfo.recordData[i].dealer = ""
  601. }else{
  602. this.recordInfo.recordData[i].dealer = val.dealer
  603. }
  604. }
  605. }
  606. },
  607. getSingleOutOrderDetail(order_id){
  608. const loading = this.$loading({
  609. lock: true,
  610. text: "Loading",
  611. spinner: "el-icon-loading",
  612. background: "rgba(0, 0, 0, 0.7)"
  613. });
  614. const params = {
  615. 'id': order_id
  616. }
  617. getSingleOutOrderDetail(params).then(response=>{
  618. if(response.data.state == 1){
  619. console.log("详情",response.data.data.list)
  620. var dealerList = response.data.data.dealerList
  621. this.dealerList = dealerList
  622. var manufacturerList = response.data.data.manufacturerList
  623. // console.log("hhhhhhhhh",manufacturerList)
  624. this.manufacturerList = manufacturerList
  625. this.goodType = response.data.data.goodType
  626. for (let i = 0; i < response.data.data.list.length; i++) {
  627. response.data.data.list[i].price = response.data.data.list[i].price.toString()
  628. response.data.data.list[i].count = response.data.data.list[i].count.toString()
  629. response.data.data.list[i].good_name = response.data.data.list[i].good_name
  630. response.data.data.list[i].name = response.data.data.list[i].specification_name + "/" + response.data.data.list[i].packing_unit
  631. response.data.data.list[i].good_type_id = response.data.data.list[i].good_type_id
  632. response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{m}-{d}")
  633. response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{m}-{d}")
  634. response.data.data.list[i].remark = response.data.data.list[i].remark
  635. if(response.data.data.list[i].dealer == 0){
  636. response.data.data.list[i].dealer = ""
  637. }
  638. if(response.data.data.list[i].manufacturer ==0 ){
  639. response.data.data.list[i].manufacturer = ""
  640. }
  641. this.recordInfo.recordData.push(response.data.data.list[i])
  642. }
  643. loading.close();
  644. }
  645. })
  646. },
  647. getStockBatchNumber(id){
  648. var params = {
  649. id:id
  650. }
  651. getStockBatchNumber(params).then(response=>{
  652. if(response.data.state == 1){
  653. var list = response.data.data.list
  654. console.log("list2243444",list)
  655. this.numberList = list
  656. }
  657. })
  658. }
  659. },
  660. created() {
  661. var nowDate = new Date();
  662. var nowYear = nowDate.getFullYear();
  663. var nowMonth = nowDate.getMonth() + 1;
  664. var nowDay = nowDate.getDate();
  665. this.warehouse_out_time =
  666. nowYear +
  667. "-" +
  668. (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
  669. "-" +
  670. (nowDay < 10 ? "0" + nowDay : nowDay);
  671. this.propForm.goodUnit = this.$store.getters.good_unit
  672. const order_id = this.$route.query.id
  673. this.getSingleOutOrderDetail(order_id)
  674. var is_sys = this.$route.query.is_sys
  675. if(is_sys == 0){
  676. this.stockShow = false
  677. }
  678. if(is_sys == 1){
  679. this.stockShow = true
  680. }
  681. }
  682. }
  683. </script>
  684. <style rel="stylesheet/css" lang="scss" scoped>
  685. .information {
  686. border: 1px #dcdfe6 solid;
  687. padding: 30px 20px 30px 20px;
  688. .border {
  689. border-bottom: 1px #dcdfe6 solid;
  690. margin: 0px 0 20px 0;
  691. }
  692. }
  693. .edit_separater {
  694. border-top: 1px solid rgb(233, 233, 233);
  695. margin-top: 15px;
  696. margin-bottom: 15px;
  697. }
  698. </style>
  699. <style>
  700. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  701. font-size: 12px;
  702. }
  703. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  704. background: #6fb5fa;
  705. }
  706. </style>