| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007 |
- <template>
- <ele-modal
- title="新建领料单"
- :visible.sync="visible"
- v-if="visible"
- :before-close="handleClose"
- :close-on-click-modal="false"
- :maxable="true"
- :close-on-press-escape="false"
- id="formId"
- append-to-body
- width="90%"
- @update:fullscreen="fullscreen"
- :fullscreen="isFullscreen"
- :height="dialogDynamicHeight"
- >
- <el-form>
- <el-row :gutter="24">
- <el-col :span="6">
- <el-form-item label="领料单编号" prop="pickCode" label-width="90px">
- <el-input v-model="pickCode" disabled=""></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="领料单名称" prop="pickName" label-width="90px">
- <el-input v-model="pickName" style="width: 260px"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <div v-for="(item, idx) in workList" :key="idx">
- <el-form
- :ref="`formRef${idx}`"
- :model="{ pickList: item }"
- :rules="tableRules"
- size="mini"
- label-position="left"
- >
- <div class="tableZ_box">
- <div class="row">
- <div class="col">
- <div class="name">生产工单号</div>
- <div class="content">{{ item.code }}</div>
- </div>
- <div class="col">
- <div class="name">产品编码</div>
- <div class="content">{{ item.productCode }}</div>
- </div>
- <div class="col">
- <div class="name">产品名称</div>
- <div class="content">{{ item.productName }}</div>
- </div>
- <div class="col">
- <div class="name">型号</div>
- <div class="content">{{ item.model }}</div>
- </div>
- <div class="col">
- <div class="name">规格</div>
- <div class="content">{{ item.specification }}</div>
- </div>
- <div class="col">
- <div class="name">颜色</div>
- <div class="content">{{ item.colorKey }}</div>
- </div>
- <div class="col">
- <div class="name">要求生产数量</div>
- <div class="content">{{ item.formingNum }}{{ item.unit }}</div>
- </div>
- <!-- <div class="col">
- <div class="name">批次号</div>
- <div class="content">{{ item.batchNo }}</div>
- </div> -->
- <div class="col pd6" v-if="clientEnvironmentId != 21">
- <el-button
- type="primary"
- size="mini"
- @click="openPicking(item.id, item)"
- >新增</el-button
- >
- <el-button type="primary" size="mini" @click="batchDelete"
- >批量删除</el-button
- >
- </div>
- </div>
- </div>
- <div>
- <el-table
- :ref="`tableRef${idx}`"
- class="table_content"
- :max-height="tabalHeight"
- :data="item.pickList"
- tooltip-effect="dark"
- style="width: 100%"
- stripe
- border
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" align="center">
- </el-table-column>
- <el-table-column label="序号" type="index" width="60">
- <template slot-scope="{ row, $index }">
- {{ $index + 1 }}
- </template>
- </el-table-column>
- <el-table-column label="类型" prop="rootCategoryLevelId" width="80">
- <template slot-scope="{ row, $index }">
- <el-tag size="mini">{{
- typeName[Number(row.rootCategoryLevelId)]
- }}</el-tag>
- </template>
- </el-table-column>
- <el-table-column
- label="编码"
- prop="assetCode"
- show-overflow-tooltip
- >
- <template slot-scope="{ row, $index }">
- <span
- v-if="
- Object.prototype.hasOwnProperty.call(row, 'isBom') &&
- row.isBom == 1
- "
- style="color: #faad14"
- >
- {{ row.categoryCode }}
- </span>
- <span v-else>
- {{
- row.rootCategoryLevelId == 4 ? row.codeNumber : row.code
- }}</span
- >
- </template>
- </el-table-column>
- <el-table-column label="批次号" prop="batchNo"> </el-table-column>
- <el-table-column label="名称" prop="name" show-overflow-tooltip>
- <template slot-scope="{ row, $index }">
- <span
- v-if="
- Object.prototype.hasOwnProperty.call(row, 'isBom') &&
- row.isBom == 1
- "
- >
- {{ row.categoryName }}
- </span>
- <span v-else> {{ row.name }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="型号"
- prop="modelType"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- label="规格"
- prop="specification"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column label="数量" prop="demandQuantity" width="140">
- <template slot-scope="{ row, $index }">
- <el-form-item>
- <el-input
- v-model="row.demandQuantity"
- @input="changeInput(row, $index)"
- size="mini"
- style="width: 120px"
- >
- <template slot="append">{{ row.measuringUnit }}</template>
- </el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <!-- <el-table-column label="计量库存数量" prop="availableCountBase">
- <template slot-scope="{ row, $index }">
- {{ row.availableCountBase }} {{ row.measuringUnit }}
- </template>
- </el-table-column> -->
- <el-table-column
- label="计量库存数量"
- prop="availableCountBase"
- width="220"
- show-overflow-tooltip
- >
- <template slot-scope="{ row, $index }">
- <div v-for="it of row.warehouseList">
- <span
- v-if="it.availableCountBase != '0'"
- @click="chooseInventoryData(row, it, $index)"
- style="cursor: pointer"
- >{{ it.name ? it.name : it.warehouse_name }}库存数:<span
- style="color: green"
- >{{ it.availableCountBase }}</span
- >{{ row.measuringUnit }}</span
- >
- </div>
- </template>
- </el-table-column>
- <el-table-column label="领料仓库" prop="warehouseId" width="180">
- <template slot-scope="{ row, $index }">
- <div
- v-if="
- Object.prototype.hasOwnProperty.call(row, 'isBom') &&
- row.isBom == 1
- "
- >
- <el-select
- v-model="row.warehouseIdList"
- placeholder="请选择"
- filterable
- multiple
- @change="changeWarehouse(row, $index)"
- >
- <el-option
- v-for="item in row.warehouseList"
- :label="item.name"
- :value="item.id"
- :key="item.id"
- >
- </el-option>
- </el-select>
- </div>
- <div v-else-if="clientEnvironmentId == 21">
- <el-select
- v-model="row.warehouseId"
- placeholder="请选择"
- filterable
- >
- <el-option
- v-for="item in row.warehouseList"
- :label="item.name"
- :value="item.id"
- :key="item.id"
- >
- </el-option>
- </el-select>
- </div>
- <div v-else>
- <el-select
- v-model="row.warehouseIdList"
- placeholder="请选择"
- filterable
- multiple
- @change="changeWarehouse(row, $index)"
- >
- <el-option
- v-for="item in row.warehouseList"
- :label="item.warehouse_name"
- :value="item.warehouse_id"
- :key="item.warehouse_id"
- >
- </el-option>
- </el-select>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- label="领料信息"
- prop="warehousePick"
- width="340"
- show-overflow-tooltip
- >
- <template slot-scope="{ $index, row }">
- <div
- v-for="it of row.warehousePick"
- :key="it.id"
- style="display: flex; flex-direction: row"
- >
- <span>{{ it.warehouseName }}</span
- >,批次号:{{ it.batchNo }},出库数:<span
- style="color: green"
- >{{ it.demandQuantity }}</span
- >
- {{ row.measuringUnit }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="100px">
- <template slot-scope="{ $index, row }">
- <el-link type="danger" @click="removeItem(idx, $index)"
- >删除</el-link
- >
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-form>
- </div>
- <template slot="footer">
- <el-button size="mini" @click="handleClose">取 消</el-button>
- <el-button
- size="mini"
- type="primary"
- :loading="loadingBtn"
- @click="save()"
- >确 定</el-button
- >
- </template>
- <pickingList
- isType="pick"
- ref="pickingListRef"
- @allSelection="allSelection"
- ></pickingList>
- <AssetsDialog
- ref="assetsRef"
- :treeIds="treeId"
- @detailData="detailData"
- ></AssetsDialog>
- </ele-modal>
- </template>
- <script>
- import pickingList from './newPickingList.vue';
- import {
- workorderList,
- getCode,
- getInventoryTotal,
- znworkorderList
- } from '@/api/produce/workOrder';
- import { typeName } from '../common.js';
- import { batchSave, znfindVoucherList } from '@/api/produce/picking';
- import AssetsDialog from './AssetsDialog.vue';
- export default {
- components: {
- pickingList,
- AssetsDialog
- },
- props: {
- workListIds: {
- type: Array,
- default() {
- return [];
- }
- }
- },
- data() {
- return {
- visible: true,
- workList: [],
- rules: {},
- pickCode: null,
- pickName: null,
- typeName,
- tableRules: {},
- loadingBtn: false,
- contentStyleObj: {
- height: ''
- },
- isFullscreen: false,
- tabalHeight: 300,
- treeId: [],
- selectionData: []
- // warehouseIdList: []
- };
- },
- computed: {
- taskObj() {
- return this.$store.state.user.taskObj;
- },
- clientEnvironmentId() {
- return this.$store.state.user.info.clientEnvironmentId;
- },
- dialogDynamicHeight() {
- if (this.isFullscreen) {
- // 全屏时,高度为窗口高度
- console.log(window.innerHeight + 'px', '全屏高度');
- this.tabalHeight = window.innerHeight - 200;
- return window.innerHeight + 'px';
- } else {
- this.tabalHeight = 300;
- return '500px';
- }
- }
- },
- watch: {},
- methods: {
- getList() {
- let param = {
- ids: this.workListIds,
- taskId: this.taskObj.id
- };
- if (this.clientEnvironmentId == 21) {
- znworkorderList(param).then((res) => {
- let arr = res.map((e) => {
- e.bomDetailDTOS.map((d) => {
- e.warehouseId =
- d.warehouseList.length > 0 ? d.warehouseList[0].id : '';
- });
- e.pickList = [...e.bomDetailDTOS];
- e.bomDetailDTOS = [];
- return e;
- });
- this.pickName = res[0].productName + '领料';
- arr[0].pickList.forEach((it) => {
- it.warehouseIdList = [];
- it.warehouseIdList.push(it.warehouseId);
- it.warehouseList.forEach((i) => {
- i.warehouse_name = i.name;
- i.warehouse_id = i.id;
- });
- });
- // arr.bomDetailDTOS.map(v=>{
- // this.getInventoryTotalFn(v.id)
- // })
- // getInventoryTotal
- // this.workList = arr;
- console.log(arr, '12344');
- this.$set(this, 'workList', arr);
- this.getOrderCode();
- this.$forceUpdate();
- });
- } else {
- workorderList(param).then((res) => {
- let arr = res.map((e) => {
- e.bomDetailDTOS.map((d) => {
- e.warehouseId =
- d.warehouseList.length > 0 ? d.warehouseList[0].id : '';
- // this.getInventoryTotalFn([d.categoryCode])
- });
- e.pickList = [...e.bomDetailDTOS];
- e.bomDetailDTOS = [];
- return e;
- });
- this.pickName = res[0].productName + '领料';
- arr[0].pickList.forEach((it) => {
- it.warehouseIdList = [];
- if (it.warehouseId) {
- it.warehouseIdList.push(it.warehouseId);
- } else {
- if (it.warehouseList.length != 0) {
- it.warehouseIdList.push(it.warehouseList[0].id);
- }
- }
- it.warehouseList.forEach((i) => {
- i.warehouse_name = i.name;
- i.warehouse_id = i.id;
- });
- });
- console.log(arr, 'e.pickList');
- // arr.bomDetailDTOS.map(v=>{
- // this.getInventoryTotalFn(v.id)
- // })
- // getInventoryTotal
- // this.workList = arr;
- this.$set(this, 'workList', arr);
- this.getOrderCode();
- // this.getInventoryTotalFn();
- this.$forceUpdate();
- });
- }
- },
- changeWarehouse(item, index) {
- // const data = [];
- // if (item.warehouseIdList.length != 0) {
- // item.warehouseIdList.forEach((it) => {
- // const chooseData = item.warehouseList.find((item) => item.id == it);
- // data.push(chooseData);
- // });
- // }
- // const pickData = [...data];
- // if (data.length != 0) {
- // const totalNum = data.reduce((acc, pro) => {
- // return pro.availableCountBase
- // ? acc + Number(pro.availableCountBase)
- // : acc;
- // }, 0);
- // this.$set(
- // this.workList[0].pickList[index],
- // 'availableCountBase',
- // totalNum
- // );
- // this.$set(
- // this.workList[0].pickList[index],
- // 'warehousePick',
- // pickData
- // );
- // console.log(this.workList[0], 'this.workList[0]');
- // this.$forceUpdate();
- // } else {
- // this.$set(this.workList[0].pickList[index], 'warehousePick', []);
- // this.$set(this.workList[0].pickList[index], 'availableCountBase', 0);
- // this.$set(this.workList[0].pickList[index], 'demandQuantity', 0);
- // }
- },
- changeInput(item, index) {
- if (Number(item.demandQuantity) >= Number(item.availableCountBase)) {
- this.$set(
- this.workList[0].pickList[index],
- 'demandQuantity',
- Number(item.availableCountBase)
- );
- const idsList = [];
- item.warehouseList.forEach((it) => {
- idsList.push(it.warehouse_id);
- });
- this.$set(
- this.workList[0].pickList[index],
- 'warehouseIdList',
- idsList
- );
- } else if (!Number(item.demandQuantity)) {
- this.$set(this.workList[0].pickList[index], 'warehouseIdList', []);
- } else {
- const idsList = [];
- let totalNum = 0;
- for (let i = 0; i < item.warehouseList.length; i++) {
- totalNum += Number(item.warehouseList[i].availableCountBase);
- if (Number(item.demandQuantity) > totalNum) {
- idsList.push(item.warehouseList[i].warehouse_id);
- } else {
- idsList.push(item.warehouseList[i].warehouse_id);
- break;
- }
- }
- this.$set(
- this.workList[0].pickList[index],
- 'warehouseIdList',
- idsList
- );
- }
- },
- // changeInput(item, index) {
- // const pickItem = this.workList[0].pickList[index];
- // let value = String(item.demandQuantity ?? '');
- // value = value.replace(/[^\d.]/g, '');
- // value = value
- // .replace(/\.{2,}/g, '.')
- // .replace('.', '$#$')
- // .replace(/\./g, '')
- // .replace('$#$', '.');
- // if (value.includes('.')) {
- // const [intPart, decPart] = value.split('.');
- // value = `${intPart}.${decPart.slice(0, 4)}`;
- // }
- // console.log(value, 'value');
- // this.$set(pickItem, 'demandQuantity', value);
- // console.log(pickItem, 'pickItem');
- // const demandQty = Number(value);
- // console.log(demandQty, 'demandQty');
- // const maxQty = Number(item.availableCountBase) || 0;
- // console.log(item, 'item');
- // console.log(maxQty, 'maxQty');
- // if (!demandQty) {
- // this.$set(pickItem, 'warehouseIdList', []);
- // return;
- // }
- // if (demandQty >= maxQty) {
- // this.$set(pickItem, 'demandQuantity', maxQty);
- // this.$set(
- // pickItem,
- // 'warehouseIdList',
- // item.warehouseList.map((w) => w.warehouse_id)
- // );
- // return;
- // }
- // let total = 0;
- // const idsList = [];
- // for (const w of item.warehouseList) {
- // total += Number(w.availableCountBase) || 0;
- // idsList.push(w.warehouse_id);
- // if (total >= demandQty) break;
- // }
- // this.$set(pickItem, 'warehouseIdList', idsList);
- // },
- detailData(data, dimension, index) {
- const itemData = [];
- data.forEach((it) => {
- itemData.push({
- batchNo: it.batchNo,
- demandQuantity: it.measureQuantity,
- warehouseId: it.warehouseId,
- warehouseName: it.warehouseName
- });
- });
- const listData = [];
- if (this.workList[0].pickList[index].warehousePick) {
- this.workList[0].pickList[index].warehousePick.forEach((it) => {
- listData.push(it);
- });
- }
- itemData.forEach((it) => {
- listData.push(it);
- });
- const warehouseIdList = [];
- listData.forEach((it) => {
- warehouseIdList.push(it.warehouseId);
- });
- const uniqueArr = Array.from(new Set(warehouseIdList));
- this.$set(this.workList[0].pickList[index], 'warehousePick', listData);
- this.$set(
- this.workList[0].pickList[index],
- 'warehouseIdList',
- uniqueArr
- );
- const total = this.workList[0].pickList[index].warehousePick.reduce(
- (acc, pro) => {
- return pro.demandQuantity ? acc + Number(pro.demandQuantity) : acc;
- },
- 0
- );
- this.$set(this.workList[0].pickList[index], 'demandQuantity', total);
- this.$forceUpdate();
- },
- handleSelectionChange(val) {
- this.selectionData = val;
- },
- batchDelete() {
- if (this.selectionData.length == 0) {
- return this.$message.warning('请选择需要删除的领料数据!');
- }
- this.$confirm('此操作将删除领料数据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {
- for (let item of this.selectionData) {
- const findIndex = this.workList[0].pickList.findIndex(
- (it) => item.id == it.id
- );
- this.workList[0].pickList.splice(findIndex, 1);
- }
- })
- .catch(() => {});
- },
- warehouseChangeNum(item, index) {
- item.warehousePick.forEach((it) => {
- if (Number(it.demandQuantity) > Number(it.availableCountBase)) {
- it.demandQuantity = it.availableCountBase;
- }
- const totalNum = item.warehousePick.reduce((acc, pro) => {
- return pro.demandQuantity ? acc + Number(pro.demandQuantity) : acc;
- }, 0);
- this.$set(
- this.workList[0].pickList[index],
- 'demandQuantity',
- totalNum
- );
- });
- },
- async getInventoryTotalFn(id) {
- let ids = [];
- this.workList.map((item) => {
- item.pickList.map((pitem) => {
- ids.push(pitem.categoryCode);
- });
- });
- if (ids.length == 0) {
- return;
- }
- const res = await getInventoryTotal(ids);
- res.map((ritem) => {
- this.workList.map((item) => {
- item.pickList.map((pitem) => {
- if (pitem.categoryCode == ritem.code) {
- pitem.availableCountBase = ritem.availableCountBase;
- }
- });
- });
- });
- },
- async getOrderCode() {
- this.pickCode = await getCode('pick_order_code');
- },
- removeItem(idx, index) {
- this.workList[idx].pickList.splice(index, 1);
- },
- handleClose() {
- this.loadingBtn = false;
- this.$emit('close', false);
- },
- openPicking(id, item) {
- this.$refs.pickingListRef.open(id, item, '选择列表');
- },
- chooseInventoryData(item, warehouseItem, index) {
- this.treeId.push(item.rootCategoryLevelId);
- this.$refs.assetsRef.open(item, warehouseItem, index);
- },
- allSelection(id, list) {
- list.forEach((item) => {
- item.code = item.categoryCode;
- item.name = item.categoryName;
- item.modelType = item.modelType ? item.modelType : item.categoryModel;
- item.measuringUnit = item.measuringUnit
- ? item.measuringUnit
- : item.measureUnit;
- item.unit = item.unit ? item.unit : item.measureUnit;
- });
- this.workList.forEach((e) => {
- if (e.id == id) {
- const newData = [];
- if (list.length != 0) {
- list.forEach((it) => {
- newData.push(this.deepCopy(it));
- });
- }
- // e.pickList = list;
- e.pickList = newData;
- this.$forceUpdate();
- }
- });
- },
- deepCopy(obj, hash = new WeakMap()) {
- if (obj === null) return null;
- if (obj instanceof Date) return new Date(obj);
- if (obj instanceof RegExp) return new RegExp(obj);
- if (typeof obj !== 'object' && typeof obj !== 'function') return obj;
- if (hash.has(obj)) return hash.get(obj);
- const result = Array.isArray(obj) ? [] : {};
- hash.set(obj, result);
- return Object.keys(obj).reduce((acc, key) => {
- acc[key] = this.deepCopy(obj[key], hash);
- return acc;
- }, result);
- },
- save() {
- if (this.workList.length > 0) {
- let bol;
- let _i;
- bol = this.workList.every((e, i) => {
- _i = i;
- return (
- Object.prototype.hasOwnProperty.call(e, 'pickList') &&
- e.pickList.length > 0
- );
- });
- if (!bol) {
- this.$message.warning(
- `生成工单${this.workList[_i].code}领料不能为空`
- );
- return false;
- }
- }
- if (this.workList.length > 0) {
- let name;
- let bol2;
- let _i;
- this.workList.forEach((e, i) => {
- _i = i;
- console.log(e.pickList);
- bol2 = e.pickList.every((y) => {
- name = y.name;
- return (
- Object.prototype.hasOwnProperty.call(y, 'demandQuantity') &&
- Number(y.demandQuantity) > 0
- );
- });
- });
- if (!bol2) {
- this.$message.warning(
- `${this.workList[_i].code}的${name}数量不能为空`
- );
- return false;
- }
- }
- let _arr = [];
- _arr = this.workList.map((m) => {
- m.instanceList = [];
- m.bomDetailDTOSList = [];
- m.pickList.forEach((e) => {
- if (
- Object.prototype.hasOwnProperty.call(e, 'isBom') &&
- e.isBom == 1
- ) {
- m.bomDetailDTOSList.push(e);
- } else {
- m.instanceList.push(e);
- }
- });
- m.workOrderId = m.id;
- return {
- ...m
- };
- });
- this.loadingBtn = true;
- // _arr.forEach((item) => {
- // item.pickList.forEach((it) => {
- // const warehousePick = [];
- // if (it.warehouseIdList.length != 0) {
- // it.warehouseIdList.forEach((i) => {
- // const data = it.warehouseList.find((ii) => ii.id == i);
- // if (data) {
- // warehousePick.push({
- // availableCountBase: data.availableCountBase,
- // demandQuantity: data.demandQuantity,
- // warehouseId: data.id
- // });
- // }
- // });
- // }
- // it.warehousePick = warehousePick;
- // });
- // });
- console.log(_arr, '_arr');
- // return;
- // if (this.clientEnvironmentId == 21) {
- // let param = {
- // workOrderId: this.workListIds[0],
- // pickingCode: this.pickCode
- // };
- // znfindVoucherList(param).then((res) => {
- // this.loadingBtn = false;
- // this.$message.success('领料成功');
- // });
- // }
- let param = {
- allPickList: _arr,
- pickName: this.pickName,
- pickCode: this.pickCode
- };
- batchSave(param)
- .then((res) => {
- this.loadingBtn = false;
- this.$message.success('领料成功');
- this.$emit('close', true);
- })
- .catch((err) => {
- this.loadingBtn = false;
- });
- },
- fullscreen() {
- this.isFullscreen = !this.isFullscreen;
- }
- },
- created() {
- this.getList();
- }
- };
- </script>
- <style lang="scss" scoped>
- .table_content {
- margin-bottom: 10px;
- }
- .tableZ_box {
- border: 1px solid #e3e5e5;
- margin: 6px 0;
- &:last-child {
- border-bottom: none;
- }
- .row {
- width: 100%;
- display: flex;
- }
- .col {
- width: calc(100% / 5) !important;
- display: flex;
- align-items: center;
- // min-width: 200px;
- min-height: 32px;
- border-bottom: 1px solid #e3e5e5;
- border-right: 1px solid #e3e5e5;
- &:last-child {
- border-right: none;
- }
- .name {
- display: flex;
- align-items: center;
- padding: 4px;
- width: 60px;
- height: 100%;
- background-color: #d0e4d5;
- color: #000;
- }
- .content {
- padding: 4px 6px;
- color: #000;
- }
- }
- .pd6 {
- padding: 0 6px;
- }
- }
- ::v-deep .pick-input.el-input--medium .el-input__inner {
- height: 22px;
- line-height: 22px;
- }
- // ::v-deep .el-select__tags {
- // flex-wrap: nowrap;
- // overflow: auto;
- // }
- // ::v-deep .el-select__tags-text {
- // max-width: 90px;
- // }
- // ::v-deep .el-select__tags::-webkit-scrollbar {
- // height: 2px !important;
- // }
- </style>
- <style>
- /* :v-deep .el-form-item__error {
- bottom: -6px !important;
- } */
- </style>
|