Browse Source

更新表格

fix_bug_pro20231227
zhangsiyu 2 years ago
parent
commit
1f8d4527dc
  1. 606
      src/components/tablecmt/tablecmt.vue
  2. 2
      src/views/distribution/disStockListDetail/disStockListDetail.vue
  3. 165
      src/views/distribution/inventory/distrilbutionBillLading.vue
  4. 5
      src/views/distribution/reservation/reservation.vue
  5. 18
      src/views/distribution/reservation/reservationAddFrom.vue
  6. 1
      src/views/distribution/signdetail/distributionSigndetail.vue
  7. 2
      src/views/distribution/signdetail/distributionSigndetaledt.vue

606
src/components/tablecmt/tablecmt.vue

@ -1,103 +1,127 @@
<template>
<div class="maboxhi">
<el-table
:data="tableData"
style="width: 100%;"
:show-summary="shownm"
:summary-method="getSummaries"
v-loading="loading"
@selection-change="handleSelectionChange"
border
height="100%"
:row-class-name="tableRowClassName"
>
<el-table-column
:type="column.type == 0 ? 'selection' : ''"
:min-width="column.width"
v-for="(column,index) in newcolumnList"
:key="column.prop"
:prop="column.prop"
:label="column.label"
:fixed="column.fixed"
:sortable="column.sortable"
v-show="column.head"
:data="tableData"
style="width: 100%"
:show-summary="shownm"
:summary-method="getSummaries"
v-loading="loading"
@selection-change="handleSelectionChange"
border
height="100%"
:row-class-name="tableRowClassName"
>
<!-- <template #header>
<el-text class="mx-1">{{ column.label }}</el-text>
</template> -->
<el-table-column
:type="column.type == 0 ? 'selection' : ''"
:min-width="column.width"
v-for="(column, index) in newcolumnList"
:key="column.prop"
:prop="column.prop"
:label="column.label"
v-if="column.type != 0"
flexible
show-overflow-tooltip
:fixed="column.fixed"
:sortable="column.sortable"
v-show="column.head"
>
<template #header>
<!-- <el-text class="mx-1">{{ column.label }}</el-text> -->
<el-input
v-if="column.type == 2"
v-model="column.values"
clearable
:placeholder="`请输入${column.label}`"
@change="inputchange($event,column)"
@blur="inputchange($event,column)"
@clear="inputclear($event,column)"
/>
<el-select
v-if="column.type == 3"
v-model="column.values"
class="m-2 selectbr"
clearable
:placeholder="`请选择${column.label}`"
@change="selectchange($event,column)"
@clear="selectclear($event,column)"
>
<el-option
v-for="item in column.checkarr"
:key="item.value"
:label="item.label"
:value="item.value"
<!-- <template #header>
<el-text class="mx-1">{{ column.label }}</el-text>
</template> -->
<el-table-column
:min-width="column.width"
:prop="column.prop"
:label="column.label"
v-if="column.type != 0"
flexible
show-overflow-tooltip
>
<template #header>
<!-- <el-text class="mx-1">{{ column.label }}</el-text> -->
<el-input
v-if="column.type == 2"
v-model="column.values"
clearable
:placeholder="`请输入${column.label}`"
@change="inputchange($event, column)"
@blur="inputchange($event, column)"
@clear="inputclear($event, column)"
/>
</el-select>
<el-date-picker
v-model="column.values"
v-if="column.type == 4"
type="date"
clearable
style="width: auto;"
:placeholder="`请选择${column.label}`"
@change="timechange($event,column)"
@clear="timeclear($event,column)"
/>
<el-date-picker
v-model="column.values"
v-if="column.type == 5"
type="datetime"
clearable
style="width: auto;"
:placeholder="`请选择${column.label}`"
format="YYYY/MM/DD HH:mm:ss"
@change="timechange($event,column)"
@clear="timeclear($event,column)"
/>
</template>
<el-select
v-if="column.type == 3"
v-model="column.values"
class="m-2 selectbr"
clearable
:placeholder="`请选择${column.label}`"
@change="selectchange($event, column)"
@clear="selectclear($event, column)"
>
<el-option
v-for="item in column.checkarr"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-date-picker
v-model="column.values"
v-if="column.type == 4"
type="date"
clearable
style="width: auto"
:placeholder="`请选择${column.label}`"
@change="timechange($event, column)"
@clear="timeclear($event, column)"
/>
<el-date-picker
v-model="column.values"
v-if="column.type == 5"
type="datetime"
clearable
style="width: auto"
:placeholder="`请选择${column.label}`"
format="YYYY/MM/DD HH:mm:ss"
@change="timechange($event, column)"
@clear="timeclear($event, column)"
/>
</template>
<template #default="scope">
<el-text class="mx-2 tabculconte" v-if="(Number(column.type)<6&&Number(column.type)>0)">{{ scope.row[column.prop] }}</el-text>
<el-text style="" class="mx-2 tabculconte colors" v-if="column.type == 9" @click="godowns(scope.row[column.downprop])">{{ scope.row[column.prop] }}</el-text>
<el-input v-if="column.type == 10" v-model="scope.row[column.prop]" type="number" :min="0"></el-input>
<div class="slotbuts" v-if="column.type == 6">
<slot v-if="column.type == 6" :scope="scope">
</slot>
</div>
<el-image preview-teleported v-if="column.type==7" style="width: 60px; height: 60px;margin-left: 10px;" :initial-index="index" :z-index="100" v-for="(item,index) in scope.row[column.prop].split(',')" :src="item" :preview-src-list="scope.row[column.prop].split(',')"/>
<!-- <el-tooltip placement="top" v-if="(Number(column.type)<6&&Number(column.type)>0)&&!column.isextrahide">
<template #default="scope">
<el-text
class="mx-2 tabculconte"
v-if="Number(column.type) < 6 && Number(column.type) > 0"
>{{ scope.row[column.prop] }}</el-text
>
<el-text
style=""
class="mx-2 tabculconte colors"
v-if="column.type == 9"
@click="godowns(scope.row[column.downprop])"
>{{ scope.row[column.prop] }}</el-text
>
<el-input
@blur="handleNumberRange(column, scope.row)"
v-if="column.type == 10"
v-model="scope.row[column.prop]"
type="number"
:min="0"
></el-input>
<div class="slotbuts" v-if="column.type == 6">
<slot v-if="column.type == 6" :scope="scope"> </slot>
</div>
<el-image
preview-teleported
v-if="column.type == 7"
style="width: 60px; height: 60px; margin-left: 10px"
:initial-index="index"
:z-index="100"
v-for="(item, index) in scope.row[column.prop].split(',')"
:src="item"
:preview-src-list="scope.row[column.prop].split(',')"
/>
<!-- <el-tooltip placement="top" v-if="(Number(column.type)<6&&Number(column.type)>0)&&!column.isextrahide">
<template #content>{{ scope.row[column.prop] }}</template>
<div class="on tabculconte">{{ scope.row[column.prop] }}</div>
</el-tooltip> -->
<!-- <slot v-if="column.type == 7" name="test" :testdata="scope"></slot> -->
<!-- <el-button
<!-- <slot v-if="column.type == 7" name="test" :testdata="scope"></slot> -->
<!-- <el-button
v-if="column.type == 6"
size="small"
@click="handleEdit(scope.$index, scope.row)"
@ -110,41 +134,45 @@
@click="handleDelete(scope.$index, scope.row)"
>Delete</el-button
> -->
</template>
</el-table-column>
</template>
</el-table-column>
<template #header>
<div style="display: inline-block;">
<div class="tilbox">
<el-text class="mx-1 tabtitles">{{ column.label }}</el-text>
<el-icon v-if="column.type==1||column.type==2||column.type==3" @click.stop="copyalls(column)"><DocumentCopy /></el-icon>
<template #header>
<div style="display: inline-block">
<div class="tilbox">
<el-text class="mx-1 tabtitles">{{ column.label }}</el-text>
<el-icon
v-if="column.type == 1 || column.type == 2 || column.type == 3"
@click.stop="copyalls(column)"
><DocumentCopy
/></el-icon>
</div>
</div>
</div>
<!-- <el-input
<!-- <el-input
v-if="column.type == 2"
v-model="column.values"
clearable
size="10"
placeholder="Type to search"
/> -->
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script lang="ts" setup>
import { computed, ref,watchEffect,getCurrentInstance } from 'vue';
import { computed, ref, watchEffect, getCurrentInstance } from 'vue';
import type { PropType } from 'vue';
const { proxy } = getCurrentInstance() as any;
/**
* 对应通知事件
* inputTxt:输入框输入的确认事件
* timeCheck:时间选择器选择事件
* selectCheck:下拉框选中事件
* selection:勾选框事件
*/
* 对应通知事件
* inputTxt:输入框输入的确认事件
* timeCheck:时间选择器选择事件
* selectCheck:下拉框选中事件
* selection:勾选框事件
*/
interface TableColumnType {
/** 表格列的key */
@ -187,20 +215,23 @@ interface TableColumnType {
/**
* true false 或者直接不写该参数
*/
sortable?:boolean;
sortable?: boolean;
/**
* true false 或者直接不写该参数
*/
head?:boolean;
head?: boolean;
/**
* 默认超出隐藏
* true是不隐藏
* false 隐藏
*/
isextrahide?:boolean;
isextrahide?: boolean;
/** urlkey
*/
downprop?:string
downprop?: string;
/**
*/
lessThanNum?: string;
}
interface TableDataType {
[key: string]: any;
@ -214,103 +245,112 @@ let props = defineProps({
type: Array as PropType<TableDataType[]>,
required: true,
},
loading:{
loading: {
type: Boolean as PropType<boolean>,
required: true,
}
},
});
let selectarr=ref([])
const tableRowClassName = ({
row,
rowIndex,
}: {
row: TableDataType
rowIndex: number
}) => {
let sfcheck=false
selectarr.value.map(item=>{
if(item==row){
sfcheck=true
let selectarr = ref([]);
const tableRowClassName = ({ row, rowIndex }: { row: TableDataType; rowIndex: number }) => {
let sfcheck = false;
selectarr.value.map(item => {
if (item == row) {
sfcheck = true;
}
})
if(sfcheck){
return 'table-SelectedRow-bgcolor'
});
if (sfcheck) {
return 'table-SelectedRow-bgcolor';
}
return ''
}
let emit =defineEmits(['inputTxt','timeCheck','selectCheck','selection'])
let newcolumnList=ref<TableColumnType[]>([])
watchEffect(()=>{
newcolumnList.value=[]
props.columnList.map(item=>{
if(!item.head){
newcolumnList.value.push(item)
return '';
};
let emit = defineEmits(['inputTxt', 'timeCheck', 'selectCheck', 'selection']);
let newcolumnList = ref<TableColumnType[]>([]);
watchEffect(() => {
newcolumnList.value = [];
props.columnList.map(item => {
if (!item.head) {
newcolumnList.value.push(item);
}
})
})
function godowns(url){
let a = document.createElement('a');//a
a.href = url; //myurl
// a.target = '_blank';
a.download = "xixi.zip";//
document.body.appendChild(a);//DOM
a.click();
window.URL.revokeObjectURL(url);// url
document.body.removeChild(a);
});
});
function godowns(url) {
let a = document.createElement('a'); //a
a.href = url; //myurl
// a.target = '_blank';
a.download = 'xixi.zip'; //
document.body.appendChild(a); //DOM
a.click();
window.URL.revokeObjectURL(url); // url
document.body.removeChild(a);
}
let shownm = ref(false);
function copyalls(column:TableColumnType){
function copyalls(column: TableColumnType) {
let text = '';
props.tableData.map((item,index)=>{
if(index<props.tableData.length-1){
if(item[column.prop]){
text+=`${item[column.prop]}\n`
props.tableData.map((item, index) => {
if (index < props.tableData.length - 1) {
if (item[column.prop]) {
text += `${item[column.prop]}\n`;
}
}else{
if(item[column.prop]){
text+=`${item[column.prop]}`
}else{
} else {
if (item[column.prop]) {
text += `${item[column.prop]}`;
} else {
}
}
})
copyContent(text)
});
copyContent(text);
}
function handleNumberRange(column: TableColumnType, row: TableDataType) {
row[column.prop] = row[column.prop].replace(/[^\.\d]/g, ''); //
if (row[column.prop]) {
//
row[column.prop] = parseInt(row[column.prop]); //
}
if (column.lessThanNum) {
if (row[column.prop] > row[column.lessThanNum]) {
row[column.prop] = row[column.lessThanNum];
proxy.$message({
type: 'error',
message: '数量不能大于可用数量',
});
}
}
console.log(column, row);
}
function handleEdit(index: number, row: TableDataType) {
console.log(index, row);
}
function inputchange(value,column:TableColumnType){
if(typeof value =='string'){
console.log(value,column)
emit('inputTxt',value,column)
function inputchange(value, column: TableColumnType) {
if (typeof value == 'string') {
console.log(value, column);
emit('inputTxt', value, column);
}
}
function selectchange(value,column:TableColumnType){
console.log(value,column)
emit('selectCheck',value,column)
function selectchange(value, column: TableColumnType) {
console.log(value, column);
emit('selectCheck', value, column);
}
function timechange(value,column:TableColumnType){
console.log(value,column)
emit('timeCheck',value,column)
function timechange(value, column: TableColumnType) {
console.log(value, column);
emit('timeCheck', value, column);
}
const handleSelectionChange=(param:TableDataType[])=>{
const handleSelectionChange = (param: TableDataType[]) => {
// console.log(param)
selectarr.value=param
emit('selection',param)
}
function inputclear(value,column:TableColumnType){
console.log('',column)
emit('inputTxt','',column)
selectarr.value = param;
emit('selection', param);
};
function inputclear(value, column: TableColumnType) {
console.log('', column);
emit('inputTxt', '', column);
}
function selectclear(value,column:TableColumnType){
console.log('',column)
emit('selectCheck','',column)
function selectclear(value, column: TableColumnType) {
console.log('', column);
emit('selectCheck', '', column);
}
function timeclear(value,column:TableColumnType){
console.log('',column)
emit('timeCheck','',column)
function timeclear(value, column: TableColumnType) {
console.log('', column);
emit('timeCheck', '', column);
}
function handleDelete(index: number, row: TableDataType) {
console.log(index, row);
@ -328,7 +368,7 @@ const getSummaries = (param: any) => {
tji = 0;
if (props.columnList[index]?.isshowSummary) {
data.map(ite => {
tji += Number(ite[props.columnList[index]?.prop]||0);
tji += Number(ite[props.columnList[index]?.prop] || 0);
});
newarr[index] = tji;
// shownm.value=true
@ -340,31 +380,34 @@ const getSummaries = (param: any) => {
console.log(newarr);
return newarr;
};
watchEffect(()=>{
watchEffect(() => {
props.columnList.map(item => {
if (item.isshowSummary) {
shownm.value = true;
}
if (item.isshowSummary) {
shownm.value = true;
}
});
});
})
//
function copyContent(content:string) {
//
let copyResult = true
//
const text = content || '让我们一起快乐的敲代码吧~';
// clipboard
if (!!window.navigator.clipboard) {
// clipboardpromise
window.navigator.clipboard.writeText(text).then((res) => {
//
function copyContent(content: string) {
//
let copyResult = true;
//
const text = content || '让我们一起快乐的敲代码吧~';
// clipboard
if (!!window.navigator.clipboard) {
// clipboardpromise
window.navigator.clipboard
.writeText(text)
.then(res => {
proxy.$message({
type: 'success',
message: '复制成功',
});
//
return copyResult;
}).catch((err) => {
copyResult = false
})
.catch(err => {
copyResult = false;
console.log('复制失败', err);
proxy.$message({
type: 'error',
@ -372,43 +415,43 @@ watchEffect(()=>{
});
//
return copyResult;
})
});
} else {
// clipboard document.execCommand()
// input
let inputDom = document.createElement('textarea');
//
inputDom.setAttribute('readonly', 'readonly');
// input
inputDom.value = text;
// inputbody
document.body.appendChild(inputDom);
// input
inputDom.select();
//
// input
// Input
const result = document.execCommand('copy');
//
if (result) {
proxy.$message({
type: 'success',
message: '复制成功',
});
} else {
// clipboard document.execCommand()
// input
let inputDom = document.createElement('textarea');
//
inputDom.setAttribute('readonly', 'readonly');
// input
inputDom.value = text;
// inputbody
document.body.appendChild(inputDom);
// input
inputDom.select();
//
// input
// Input
const result = document.execCommand('copy')
//
if (result) {
proxy.$message({
type: 'success',
message: '复制成功',
});
} else {
console.log('复制失败');
proxy.$message({
type: 'error',
message: '复制失败',
});
copyResult = false
}
//
document.body.removeChild(inputDom);
//
return copyResult;
console.log('复制失败');
proxy.$message({
type: 'error',
message: '复制失败',
});
copyResult = false;
}
//
document.body.removeChild(inputDom);
//
return copyResult;
}
}
</script>
<style lang="scss">
// :root{
@ -416,10 +459,9 @@ watchEffect(()=>{
// --el-checkbox-checked-input-border-color:'#D3832A';
// }
.el-table {
//
--el-table-row-hover-bg-color: #D3832A;
--el-table-row-hover-bg-color: #d3832a;
}
// .el-table .warning-row {
@ -428,65 +470,65 @@ watchEffect(()=>{
// .el-table .success-row {
// --el-table-tr-bg-color: var(--el-color-success-light-9);
// }
.maboxhi{
.maboxhi {
width: 100%;
height: calc(100vh - 350px);
// flex:1;
// min-height: 100%;
}
.on{
.on {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 12px !important;
}
.selectbr{
.selectbr {
border: none !important;
font-size: 12px !important;
}
.tabtitles{
color: #092C4D !important;
.tabtitles {
color: #092c4d !important;
font-size: 12px !important;
margin-right: 5px !important;
}
.el-table .ascending .sort-caret.ascending{
border-bottom-color: #D3832A !important;
.el-table .ascending .sort-caret.ascending {
border-bottom-color: #d3832a !important;
font-size: 12px !important;
}
.el-table .descending .sort-caret.descending{
border-top-color: #D3832A !important;
.el-table .descending .sort-caret.descending {
border-top-color: #d3832a !important;
font-size: 12px !important;
}
.tabculconte{
.tabculconte {
color: #333333 !important;
font-size: 12px !important;
}
.slotbuts{
.slotbuts {
height: 25px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px !important;
}
.slotbuts .el-text{
color: #D3832A !important;
.slotbuts .el-text {
color: #d3832a !important;
margin-right: 10px !important;
cursor: pointer;
font-size: 12px !important;
&:nth-last-child(1){
&:nth-last-child(1) {
margin-right: 0px !important;
}
}
.el-popper.is-pure.is-light.el-dropdown__popper .el-text{
color: #D3832A !important;
.el-popper.is-pure.is-light.el-dropdown__popper .el-text {
color: #d3832a !important;
margin-right: 10px !important;
cursor: pointer;
font-size: 12px !important;
&:nth-last-child(1){
&:nth-last-child(1) {
margin-right: 0px !important;
}
}
.el-table .el-input__inner{
.el-table .el-input__inner {
height: 23px !important;
}
// .el-checkbox__input.is-checked .el-checkbox__inner{
@ -504,53 +546,57 @@ watchEffect(()=>{
// background-color: #D3832A !important;
// border-color: #D3832A !important;
// }
.el-table .el-table__cell{
.el-table .el-table__cell {
padding: 0px !important;
}
.el-checkbox__input.is-checked .el-checkbox__inner,
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
border-color: #D3832A!important;
background-color: #D3832A!important;
}
.el-checkbox__input.is-focus .el-checkbox__inner{
border-color: #D3832A!important;
}
//
.el-checkbox__input.is-checked+.el-checkbox__label{
color:#D3832A!important;
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
border-color: #d3832a !important;
background-color: #d3832a !important;
}
.el-checkbox__input.is-focus .el-checkbox__inner {
border-color: #d3832a !important;
}
//
.el-checkbox__input.is-checked + .el-checkbox__label {
color: #d3832a !important;
}
.el-checkbox__inner:hover{
border-color: #D3832A!important;
.el-checkbox__inner:hover {
border-color: #d3832a !important;
font-size: 12px !important;
}
.table-SelectedRow-bgcolor {
>td{
background-color:#f7e8d7 !important;
}
}
.colors{
color: #409EFF !important;
> td {
background-color: #f7e8d7 !important;
}
}
.colors {
color: #409eff !important;
cursor: pointer !important;
}
.el-table .cell{
.el-table .cell {
line-height: 22px !important;
}
.el-table .el-input__inner{
.el-table .el-input__inner {
font-size: 12px !important;
}
.el-table__body tr.hover-row.current-row>td,.el-table__body tr.hover-row.el-table__row--striped.current-row>td,.el-table__body tr.hover-row.el-table__row--striped>td,.el-table__body tr.hover-row>td{
background-color:#d3d8e1 !important;
.el-table__body tr.hover-row.current-row > td,
.el-table__body tr.hover-row.el-table__row--striped.current-row > td,
.el-table__body tr.hover-row.el-table__row--striped > td,
.el-table__body tr.hover-row > td {
background-color: #d3d8e1 !important;
}
.el-date-editor.el-input, .el-date-editor.el-input__wrapper{
.el-date-editor.el-input,
.el-date-editor.el-input__wrapper {
height: 23px !important;
}
.copys{
.copys {
display: inline-block;
margin-left: 5px;
padding-top: 5px;
margin-right: 5px;
}
.tilbox{
.tilbox {
display: flex;
align-items: center;
}

2
src/views/distribution/disStockListDetail/disStockListDetail.vue

@ -138,7 +138,7 @@
</template>
<script>
import { getList, getDetail, add, update, remove } from "@/option/distribution/disStockListDetail";
import { getList, getDetail, add, update, remove } from "@/api/distribution/disStockListDetail";
import option from "@/option/distribution/disStockListDetail";
import { mapGetters } from "vuex";

165
src/views/distribution/inventory/distrilbutionBillLading.vue

@ -237,63 +237,31 @@
>
</template>
</tablecmt>
</el-tab-pane>
<el-tab-pane label="库存品">
<el-button type="primary" text icon="el-icon-view" @click="handleAddView(row)"
>新增</el-button
>
<el-table
ref="table"
v-loading="loading"
@selection-change="selectionChange"
:data="data"
style="width: 100%"
:border="option.border"
<tablecmt
:columnList="columnStock"
:tableData="data"
:loading="loading"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<!-- <el-table-column type="selection" v-if="option.selection" width="50" align="center"></el-table-column>-->
<el-table-column
type="expand"
v-if="option.expand"
align="center"
></el-table-column>
<el-table-column
v-if="option.index"
label="序号"
type="index"
width="70"
align="center"
>
</el-table-column>
<template v-for="(item, index) in option.columnStock">
<!-- table字段 -->
<el-table-column
v-if="item.hide !== true"
:prop="item.prop"
:label="item.label"
:width="item.width"
:key="index"
<template #default="slotProps">
<el-text
type="primary"
text
icon="el-icon-delete"
@click="rowStock(slotProps.scope.row)"
>移除</el-text
>
</el-table-column>
</template>
<!-- 操作栏模块 -->
<el-table-column prop="menu" label="添加数量" :width="220" align="center">
<template #="{ row }">
<el-input
v-model="row.inventoryQuantity"
@blur="handleNumberRange($event, row)"
></el-input>
</template>
</el-table-column>
<!-- 操作栏模块 -->
<el-table-column prop="menu" label="操作" :width="220" align="center">
<template #="{ row }">
<el-button type="primary" text icon="el-icon-delete" @click="rowStock(row)"
>移除</el-button
>
</template>
</el-table-column>
</el-table>
</tablecmt>
</el-tab-pane>
</el-tabs>
</el-form-item>
@ -506,6 +474,7 @@ import { getToken } from '@/utils/auth';
import { getListStockList } from '@/api/distribution/distributionStockList';
import { getListOne } from '@/api/distribution/distributionStockArticle';
import dayjs from 'dayjs';
import { detail } from '@/api/flow/flow';
export default {
data() {
@ -1453,11 +1422,106 @@ export default {
hide: true,
},
],
columnStock: [
{
prop: 'orderCode',
label: '订单自编号',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: true,
sortable: true,
head: false,
},
{
prop: 'marketName',
label: '商场名称',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'descriptionGoods',
label: '货物名称',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'cargoUnit',
label: '货物单位',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'available',
label: '可用数量',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'inventoryQuantity',
label: '添加数量',
type: 10,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
lessThanNum:'available'
},
{
prop: '',
label: '操作',
type: 6,
values: '',
width: '150',
checkarr: [],
fixed: 'right',
hide: true,
},
],
};
},
mounted() {
this.init();
let arr = [];
this.option.columnStock.map(item => {
if (!item.hide) {
arr.push({
prop: item.prop,
label: item.label,
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: true,
sortable: true,
head: false,
});
}
});
console.log(JSON.stringify(arr));
if (this.$route.query.type == '2') {
//
this.getDetailOen();
@ -1831,7 +1895,6 @@ export default {
}
if (e.target.value > row.available) {
this.$message.error('数量不能大于可用数量');
// e.target.value = row.quantityStock;
return;
}
}

5
src/views/distribution/reservation/reservation.vue

@ -1029,6 +1029,11 @@ export default {
this.height = this.setPx(document.body.clientHeight - 340);
},
handleClick() {
if(this.activeName=='yescheck'){
this.activeName='nocheck'
}else if(this.activeName=='nocheck'){
this.activeName='yescheck'
}
if(this.activeName=='yescheck'){
this.bbb()
}else if(this.activeName=='nocheck'){

18
src/views/distribution/reservation/reservationAddFrom.vue

@ -1389,23 +1389,7 @@ export default {
},
mounted() {
this.init();
let arr = [];
this.option.stockListColumn.map(item => {
if (!item.hide) {
arr.push({
prop: item.prop,
label: item.label,
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
});
}
});
console.log(JSON.stringify(arr));
this.onLoad(this.page);
this.getDictionary();
},

1
src/views/distribution/signdetail/distributionSigndetail.vue

@ -627,6 +627,7 @@ export default {
selectionClear () {
this.selectionList = [];
this.$refs.table.clearSelection();
},
currentChange (currentPage) {
this.page.currentPage = currentPage;

2
src/views/distribution/signdetail/distributionSigndetaledt.vue

@ -923,7 +923,7 @@ export default {
},
selectionClear() {
this.selectionList = [];
this.$refs.table.clearSelection();
// this.$refs.table.clearSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;

Loading…
Cancel
Save