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

stockOutOrderEdit.vue 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760
  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="false"
  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="请选择">
  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 } 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. }
  284. },
  285. methods: {
  286. comfirm: function(val) {
  287. this.$refs.dialog.hide();
  288. this.propForm.goodType = [];
  289. this.propForm.goods = [];
  290. if (val.selectedGoodInfo.length > 0) {
  291. for (let i = val.selectedGoodInfo.length - 1; ; i--) {
  292. if (i == 0) {
  293. this.recordInfo.recordData[this.currentIndex].good_type_id =
  294. val.selectedGoodInfo[i].good_type_id;
  295. this.recordInfo.recordData[this.currentIndex].good_id =
  296. val.selectedGoodInfo[i].id;
  297. this.recordInfo.recordData[
  298. this.currentIndex
  299. ].price = val.selectedGoodInfo[i].buy_price.toString();
  300. } else {
  301. const tempForm = {};
  302. tempForm["id"] = 0;
  303. tempForm["good_type_id"] = val.selectedGoodInfo[i].good_type_id;
  304. tempForm["good_id"] = val.selectedGoodInfo[i].id;
  305. tempForm["count"] = "";
  306. tempForm["price"] = val.selectedGoodInfo[i].buy_price.toString();
  307. tempForm["remark"] = "";
  308. this.recordInfo.recordData.splice(
  309. this.currentIndex + 1,
  310. 0,
  311. tempForm
  312. );
  313. }
  314. }
  315. }
  316. this.currentIndex = -1;
  317. },
  318. cancle: function() {
  319. this.$refs.dialog.hide()
  320. this.propForm.goods = [];
  321. this.propForm.goodType = [];
  322. },
  323. GetConfigInfo: function() {
  324. const loading = this.$loading({
  325. lock: true,
  326. text: "Loading",
  327. spinner: "el-icon-loading",
  328. background: "rgba(0, 0, 0, 0.7)"
  329. });
  330. GetAllConfig().then(response => {
  331. if (response.data.state == 0) {
  332. this.$message.error(response.data.msg);
  333. return false;
  334. } else {
  335. this.manufacturerList = response.data.data.manufacturer;
  336. this.dealer = response.data.data.dealer;
  337. this.goodType = response.data.data.goodType;
  338. this.goodInfo = response.data.data.goodInfo;
  339. }
  340. loading.close();
  341. });
  342. }, typeName: function(good_type_id) {
  343. let name = "";
  344. for (let i = 0; i < this.goodType.length; i++) {
  345. if (this.goodType[i].id == good_type_id) {
  346. name = this.goodType[i].type_name;
  347. }
  348. }
  349. return name;
  350. }, specificationName: function(good_info_id) {
  351. let name = "";
  352. for (let i = 0; i < this.goodInfo.length; i++) {
  353. if (this.goodInfo[i].id == good_info_id) {
  354. name = this.goodInfo[i].specification_name;
  355. }
  356. }
  357. return name;
  358. },
  359. handleEdit: function(index, row) {
  360. if(this.stockShow == true){
  361. this.$message.error("自动出库数据无法编辑")
  362. return
  363. }
  364. const tempObj = {}
  365. tempObj['id'] = 0
  366. tempObj['good_type_id'] = 0
  367. tempObj['good_id'] = 0
  368. tempObj['count'] = ''
  369. tempObj['price'] = ''
  370. tempObj['remark'] = ''
  371. tempObj['number'] = ""
  372. tempObj['license_number'] = ""
  373. tempObj['dealer'] = ""
  374. tempObj['manufacturer'] = ""
  375. this.recordInfo.recordData.push(tempObj)
  376. },
  377. handleDelete: function(index, row) {
  378. if(this.stockShow == true){
  379. this.$message.error("自动出库数据无法删除")
  380. return
  381. }
  382. if (row.id == 0) {
  383. this.recordInfo.recordData.splice(index, 1)
  384. } else {
  385. const params = {
  386. id: row.id
  387. }
  388. this.$confirm('确认删除该出库耗材信息记录?', '删除出库耗材信息记录', {
  389. confirmButtonText: '确定',
  390. cancelButtonText: '取消',
  391. type: 'warning'
  392. }).then(() => {
  393. deleteWarehouseOutInfo(params).then(response => {
  394. if (response.data.state == 0) {
  395. this.$message.error(response.data.msg)
  396. return false
  397. } else {
  398. this.$message.success('删除成功')
  399. this.recordInfo.recordData.splice(index, 1)
  400. }
  401. })
  402. }).catch(() => {
  403. })
  404. }
  405. }, getTime(val, temp) {
  406. if (val != 0) {
  407. return uParseTime(val, temp)
  408. } else {
  409. return ''
  410. }
  411. },
  412. showDialog(index, row) {
  413. this.currentIndex = index;
  414. const loading = this.$loading({
  415. lock: true,
  416. text: "Loading",
  417. spinner: "el-icon-loading",
  418. background: "rgba(0, 0, 0, 0.7)"
  419. });
  420. const params = {
  421. manufacturer_id: this.form.manufacturer,
  422. dealer_id: this.form.dealer
  423. };
  424. this.propForm.goods = []
  425. GetAllGoodInfoByID(params).then(response => {
  426. if (response.data.state == 0) {
  427. this.$message.error(response.data.msg);
  428. return false;
  429. } else {
  430. if (response.data.data.goodInfo.length <= 0) {
  431. this.$message.error("该厂商或经销商没有物品信息");
  432. return;
  433. }
  434. this.$refs.dialog.show();
  435. for (let i = 0; i < response.data.data.goodInfo.length; i++) {
  436. this.propForm.goodType.push(
  437. response.data.data.goodInfo[i].type
  438. );
  439. }
  440. const obj = {};
  441. this.propForm.goodType = this.propForm.goodType.reduce(
  442. (cur, next) => {
  443. obj[next.id] ? "" : (obj[next.id] = true && cur.push(next));
  444. return cur;
  445. },
  446. []
  447. ); // 设置cur默认类型为数组,并且初始值为空的数组
  448. }
  449. for (let i = 0; i < this.propForm.goodType.length; i++) {
  450. let goodInfo = [];
  451. let goodObj = {};
  452. for (let a = 0; a < response.data.data.goodInfo.length; a++) {
  453. var respObj = response.data.data.goodInfo[a];
  454. respObj["isSelected"] = false;
  455. if (respObj.type.id == this.propForm.goodType[i].id) {
  456. goodInfo.push(respObj);
  457. }
  458. }
  459. const obj = {};
  460. goodInfo = goodInfo.reduce((cur, next) => {
  461. obj[next.id] ? "" : (obj[next.id] = true && cur.push(next));
  462. return cur;
  463. }, []); // 设置cur默认类型为数组,并且初始值为空的数组
  464. this.$set(goodObj, this.propForm.goodType[i].id, goodInfo);
  465. this.propForm.goods.push(goodObj);
  466. }
  467. loading.close();
  468. });
  469. },
  470. back() {
  471. this.$router.go(-1)
  472. },
  473. submit() {
  474. this.$refs['tableForm'].validate((valid) => {
  475. if (valid) {
  476. const array = this.recordInfo.recordData
  477. for (let i = 0; i < array.length; i++) {
  478. if (array[i].good_type_id == 0) {
  479. this.$message.error('商品类型不能为空')
  480. return
  481. }
  482. if (array[i].good_id == 0) {
  483. this.$message.error('规格名称不能为空')
  484. return
  485. }
  486. }
  487. for(let i=0;i<this.recordInfo.recordData.length;i++){
  488. if(this.recordInfo.recordData[i].dealer == ""){
  489. this.recordInfo.recordData[i].dealer = 0
  490. }
  491. if(this.recordInfo.recordData[i].expiry_date == "" || this.recordInfo.recordData[i].expiry_date == undefined){
  492. this.recordInfo.recordData[i].expiry_date = ""
  493. }
  494. if(this.recordInfo.recordData[i].product_date == "" || this.recordInfo.recordData[i].product_date == undefined){
  495. this.recordInfo.recordData[i].product_date = ""
  496. }
  497. this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
  498. for(let j=0;j<this.manufacturerList.length;j++){
  499. if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
  500. this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
  501. }
  502. }
  503. for(let z=0;z<this.dealerList.length;z++){
  504. if(this.recordInfo.recordData[i].dealer == this.dealerList[z].dealer_name){
  505. this.recordInfo.recordData[i].dealer = this.dealerList[z].id
  506. }
  507. }
  508. }
  509. const params = {
  510. 'stockOut': this.recordInfo.recordData
  511. }
  512. console.log("stockout",params)
  513. editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
  514. if (response.data.state == 0) {
  515. this.$message.error(response.data.msg)
  516. return false
  517. } else {
  518. this.$message.success('保存成功')
  519. this.$router.back(-1)
  520. }
  521. })
  522. } else {
  523. return false
  524. }
  525. })
  526. },
  527. calculate: function(val) {
  528. if (val == 0) {
  529. return ''
  530. }
  531. return Math.round(parseFloat(val) * 100) / 100
  532. }, changeManufacturer(val) {
  533. this.propForm.manufacturer = val
  534. }, changeDealer(val) {
  535. this.propForm.dealer = val
  536. },
  537. querySearchAsync(keyword, cb) {
  538. let key = '';
  539. if (keyword != undefined) {
  540. key = keyword
  541. }
  542. console.log("keyrowrd",key)
  543. postSearchGoodList(key).then(response => {
  544. if (response.data.state == 1) {
  545. var list = response.data.data.list
  546. this.goodList = list
  547. var manufacturerList = response.data.data.manufacturerList
  548. this.manufacturerList = manufacturerList
  549. for(let i=0;i<this.goodList.length;i++){
  550. for(let j=0;j<this.manufacturerList.length;j++){
  551. if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
  552. this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
  553. }
  554. }
  555. for(let z=0;z<this.dealerList.length;z++){
  556. if(this.goodList[i].dealer == this.dealerList[z].id){
  557. this.goodList[i].dealer = this.dealerList[z].dealer_name
  558. }
  559. }
  560. }
  561. cb(this.goodList)
  562. } else {
  563. cb([])
  564. }
  565. })
  566. },
  567. changeGoodName(val){
  568. this.currentIndex = val
  569. },
  570. handleSelect(val){
  571. console.log("val22222",val)
  572. for(let i=0;i<this.recordInfo.recordData.length;i++){
  573. if(this.currentIndex == i){
  574. this.recordInfo.recordData[i].good_type_id = val.id
  575. this.recordInfo.recordData[i].good_name = val.good_name
  576. this.recordInfo.recordData[i].good_type_id = val.good_type_id
  577. this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
  578. this.recordInfo.recordData[i].manufacturer = val.manufacturer
  579. this.recordInfo.recordData[i].remark = val.remark
  580. this.recordInfo.recordData[i].license_number = ""
  581. if(val.packing_price == 0){
  582. this.recordInfo.recordData[i].price = ""
  583. }else{
  584. this.recordInfo.recordData[i].price = val.packing_price
  585. }
  586. this.recordInfo.recordData[i].specification_name = val.specification_name
  587. this.recordInfo.recordData[i].good_id = val.id
  588. if(val.dealer == 0){
  589. this.recordInfo.recordData[i].dealer = ""
  590. }else{
  591. this.recordInfo.recordData[i].dealer = val.dealer
  592. }
  593. }
  594. }
  595. // if(val.xt_warehouse_info.length > 0){
  596. // for(let j=0;j<val.xt_warehouse_info.length;j++){
  597. // this.numberList.push(val.xt_warehouse_info[j])
  598. // }
  599. // this.recordInfo.recordData[i].number = val.xt_warehouse_info[0].number
  600. // }else{
  601. // this.recordInfo.recordData[i].number = ""
  602. // }
  603. },
  604. getSingleOutOrderDetail(order_id){
  605. const loading = this.$loading({
  606. lock: true,
  607. text: "Loading",
  608. spinner: "el-icon-loading",
  609. background: "rgba(0, 0, 0, 0.7)"
  610. });
  611. const params = {
  612. 'id': order_id
  613. }
  614. getSingleOutOrderDetail(params).then(response=>{
  615. if(response.data.state == 1){
  616. console.log("详情",response.data.data.list)
  617. var dealerList = response.data.data.dealerList
  618. this.dealerList = dealerList
  619. var manufacturerList = response.data.data.manufacturerList
  620. // console.log("hhhhhhhhh",manufacturerList)
  621. this.manufacturerList = manufacturerList
  622. this.goodType = response.data.data.goodType
  623. for (let i = 0; i < response.data.data.list.length; i++) {
  624. response.data.data.list[i].price = response.data.data.list[i].price.toString()
  625. response.data.data.list[i].count = response.data.data.list[i].count.toString()
  626. response.data.data.list[i].good_name = response.data.data.list[i].good_name
  627. response.data.data.list[i].name = response.data.data.list[i].specification_name + "/" + response.data.data.list[i].packing_unit
  628. response.data.data.list[i].good_type_id = response.data.data.list[i].good_type_id
  629. response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{m}-{d}")
  630. response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{m}-{d}")
  631. response.data.data.list[i].remark = response.data.data.list[i].remark
  632. if(response.data.data.list[i].dealer == 0){
  633. response.data.data.list[i].dealer = ""
  634. }
  635. if(response.data.data.list[i].manufacturer ==0 ){
  636. response.data.data.list[i].manufacturer = ""
  637. }
  638. this.recordInfo.recordData.push(response.data.data.list[i])
  639. }
  640. loading.close();
  641. }
  642. })
  643. }
  644. },
  645. created() {
  646. var nowDate = new Date();
  647. var nowYear = nowDate.getFullYear();
  648. var nowMonth = nowDate.getMonth() + 1;
  649. var nowDay = nowDate.getDate();
  650. this.warehouse_out_time =
  651. nowYear +
  652. "-" +
  653. (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
  654. "-" +
  655. (nowDay < 10 ? "0" + nowDay : nowDay);
  656. this.propForm.goodUnit = this.$store.getters.good_unit
  657. const order_id = this.$route.query.id
  658. this.getSingleOutOrderDetail(order_id)
  659. var is_sys = this.$route.query.is_sys
  660. if(is_sys == 0){
  661. this.stockShow = false
  662. }
  663. if(is_sys == 1){
  664. this.stockShow = true
  665. }
  666. }
  667. }
  668. </script>
  669. <style rel="stylesheet/css" lang="scss" scoped>
  670. .information {
  671. border: 1px #dcdfe6 solid;
  672. padding: 30px 20px 30px 20px;
  673. .border {
  674. border-bottom: 1px #dcdfe6 solid;
  675. margin: 0px 0 20px 0;
  676. }
  677. }
  678. .edit_separater {
  679. border-top: 1px solid rgb(233, 233, 233);
  680. margin-top: 15px;
  681. margin-bottom: 15px;
  682. }
  683. </style>
  684. <style>
  685. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  686. font-size: 12px;
  687. }
  688. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  689. background: #6fb5fa;
  690. }
  691. </style>