|
@@ -1,257 +1,125 @@
|
|
|
<template>
|
|
|
- <el-dialog
|
|
|
- title="提示"
|
|
|
- :visible.sync="uploadVisible"
|
|
|
- width="85%"
|
|
|
- :close-on-click-modal="false"
|
|
|
- @close="handleClose"
|
|
|
- v-dialogDrag
|
|
|
- >
|
|
|
+ <el-dialog title="提示" :visible.sync="uploadVisible" width="85%" :close-on-click-modal="false" @close="handleClose"
|
|
|
+ v-dialogDrag>
|
|
|
<span>
|
|
|
- <div
|
|
|
- style="
|
|
|
+ <div style="
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
<div style="display: flex;;margin-bottom: 10px;">
|
|
|
- <el-upload
|
|
|
- :action="actionUrl"
|
|
|
- multiple
|
|
|
- :on-progress="progress"
|
|
|
- :headers="headers"
|
|
|
- :show-file-list="false"
|
|
|
+ <el-upload :action="actionUrl" multiple :on-progress="progress" :headers="headers" :show-file-list="false"
|
|
|
:on-success="
|
|
|
(res) => {
|
|
|
handleSucces(res);
|
|
|
}
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
<el-button size="small" type="primary">导入Excel</el-button>
|
|
|
</el-upload>
|
|
|
- <el-button
|
|
|
- v-if="false"
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- @click="bathHandle"
|
|
|
- :disabled="selection.length != 1"
|
|
|
- style="margin-left:10px"
|
|
|
- >批量处理属性(详情)</el-button
|
|
|
- >
|
|
|
+ <el-button v-if="false" size="small" type="primary" @click="bathHandle" :disabled="selection.length != 1"
|
|
|
+ style="margin-left:10px">批量处理属性(详情)</el-button>
|
|
|
</div>
|
|
|
<div style="margin: 0 10px">
|
|
|
- <el-button
|
|
|
- icon="el-icon-setting"
|
|
|
- size="mini"
|
|
|
- circle
|
|
|
- @click="showSetting = !showSetting"
|
|
|
- ></el-button>
|
|
|
+ <el-button icon="el-icon-setting" size="mini" circle @click="showSetting = !showSetting"></el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table :data="excelList" @selection-change="Selectinventory" v-loading="loading" element-loading-text="努力加载中">
|
|
|
<el-table-column type="selection" width="50" align="center" fixed />
|
|
|
- <el-table-column
|
|
|
- label="序号"
|
|
|
- type="index"
|
|
|
- width="50"
|
|
|
- fixed
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- v-for="(item, index) in getRowList"
|
|
|
- v-if="item.show"
|
|
|
- :key="index"
|
|
|
- :label="item.name"
|
|
|
- :width="item.width"
|
|
|
- :prop="item.label"
|
|
|
- align="center"
|
|
|
- :fixed="item.fixed"
|
|
|
- sortable
|
|
|
- >
|
|
|
+ <el-table-column label="序号" type="index" width="50" fixed align="center" />
|
|
|
+ <el-table-column v-for="(item, index) in getRowList" v-if="item.show" :key="index" :label="item.name"
|
|
|
+ :width="item.width" :prop="item.label" align="center" :fixed="item.fixed" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="item.label == 'fBsdate'">
|
|
|
- <el-date-picker
|
|
|
- v-model="scope.row.fBsdate"
|
|
|
- type="date"
|
|
|
- style="width: 100%"
|
|
|
- value-format="timestamp"
|
|
|
- placeholder="入库日期"
|
|
|
- @change="dateSelected(scope,'fBsdate')"
|
|
|
- >
|
|
|
+ <el-date-picker v-model="scope.row.fBsdate" type="date" style="width: 100%" value-format="timestamp"
|
|
|
+ placeholder="入库日期" @change="dateSelected(scope, 'fBsdate')">
|
|
|
</el-date-picker>
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fGoodsid'">
|
|
|
- <el-select
|
|
|
- filterable
|
|
|
- v-model="scope.row.fGoodsid"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="请选择品名"
|
|
|
- @change="dateSelected(scope,'fGoodsid')"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in goodsOptions"
|
|
|
- :key="index.fId"
|
|
|
- :label="item.fName"
|
|
|
- :value="item.fId"
|
|
|
- ></el-option>
|
|
|
+ <el-select filterable v-model="scope.row.fGoodsid" style="width: 100%" placeholder="请选择品名"
|
|
|
+ @change="dateSelected(scope, 'fGoodsid')">
|
|
|
+ <el-option v-for="(item, index) in goodsOptions" :key="index.fId" :label="item.fName" :value="item.fId">
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fBusinessType'">
|
|
|
- <el-select
|
|
|
- filterable
|
|
|
- v-model="scope.row.fBusinessType"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="请选择商品属性"
|
|
|
- @change="dateSelected(scope,'fBusinessType')"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in fStorageTypeOptions"
|
|
|
- :key="index.dictValue"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- />
|
|
|
+ <el-select filterable v-model="scope.row.fBusinessType" style="width: 100%" placeholder="请选择商品属性"
|
|
|
+ @change="dateSelected(scope, 'fBusinessType')">
|
|
|
+ <el-option v-for="(item, index) in fStorageTypeOptions" :key="index.dictValue" :label="item.dictLabel"
|
|
|
+ :value="item.dictValue" />
|
|
|
</el-select>
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fMarks'">
|
|
|
- <el-input
|
|
|
- v-model="scope.row.fMarks"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="请填写属性描述"
|
|
|
- @change="dateSelected(scope,'fMarks')"
|
|
|
- />
|
|
|
+ <el-input v-model="scope.row.fMarks" style="width: 100%" placeholder="请填写属性描述"
|
|
|
+ @change="dateSelected(scope, 'fMarks')" />
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.label == 'fCntqty'">
|
|
|
+ <el-input v-model="scope.row.fCntqty" style="width: 100%" placeholder="请填写属性描述"
|
|
|
+ @change="dateSelected(scope, 'fCntqty')" />
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fWarehouseInformation'">
|
|
|
- <el-input
|
|
|
- placeholder="请选择"
|
|
|
- v-model="scope.row.fWarehouseInformation"
|
|
|
- @focus="getTreeselect(scope)"
|
|
|
- >
|
|
|
+ <el-input placeholder="请选择" v-model="scope.row.fWarehouseInformation" @focus="getTreeselect(scope)">
|
|
|
</el-input>
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fQty'">
|
|
|
- <el-input
|
|
|
- v-input-limit="0"
|
|
|
- v-model.number="scope.row.fQty"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="件数"
|
|
|
- />
|
|
|
+ <el-input v-input-limit="0" v-model.number="scope.row.fQty" style="width: 100%" placeholder="件数" />
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fGrossweight'">
|
|
|
- <el-input
|
|
|
- v-model.number="scope.row.fGrossweight"
|
|
|
- v-input-limit="2"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="毛重"
|
|
|
- />
|
|
|
+ <el-input v-model.number="scope.row.fGrossweight" v-input-limit="2" style="width: 100%"
|
|
|
+ placeholder="毛重" />
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fNetweight'">
|
|
|
- <el-input
|
|
|
- v-model.number="scope.row.fNetweight"
|
|
|
- v-input-limit="2"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="净重"
|
|
|
- />
|
|
|
+ <el-input v-model.number="scope.row.fNetweight" v-input-limit="2" style="width: 100%" placeholder="净重" />
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fPackagespecs'">
|
|
|
- <el-input
|
|
|
- v-model="scope.row.fPackagespecs"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="包装规格"
|
|
|
- />
|
|
|
+ <el-input v-model="scope.row.fPackagespecs" style="width: 100%" placeholder="包装规格" />
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fElabel'" v-show="showDataElabel == '0'">
|
|
|
- <el-input
|
|
|
- v-model="scope.row.fElabel"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="电子标签"
|
|
|
- />
|
|
|
+ <el-input v-model="scope.row.fElabel" style="width: 100%" placeholder="电子标签" />
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fCntrno'">
|
|
|
- <el-input
|
|
|
- v-model="scope.row.fCntrno"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="箱号"
|
|
|
- v-Alphabet
|
|
|
- @change="unRepeat(scope.row.fCntrno, scope.$index)"
|
|
|
- />
|
|
|
+ <el-input v-model="scope.row.fCntrno" style="width: 100%" placeholder="箱号" v-Alphabet
|
|
|
+ @change="unRepeat(scope.row.fCntrno, scope.$index)" />
|
|
|
</span>
|
|
|
<span v-else-if="item.label == 'fTruckno'">
|
|
|
- <el-input
|
|
|
- v-model="scope.row.fTruckno"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="车号"
|
|
|
- v-Alphabet
|
|
|
- />
|
|
|
+ <el-input v-model="scope.row.fTruckno" style="width: 100%" placeholder="车号" v-Alphabet />
|
|
|
</span>
|
|
|
<span v-else>{{ scope.row[item.label] }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-dialog
|
|
|
- title="自定义列显示"
|
|
|
- :visible.sync="showSetting"
|
|
|
- width="700px"
|
|
|
- v-dialogDrag
|
|
|
- :close-on-click-modal="false"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
+ <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px" v-dialogDrag :close-on-click-modal="false"
|
|
|
+ append-to-body>
|
|
|
<template slot="title">
|
|
|
<div class="avue-crud__dialog__header">
|
|
|
<span class="el-dialog__title">
|
|
|
- <span
|
|
|
- style="
|
|
|
+ <span style="
|
|
|
display: inline-block;
|
|
|
width: 3px;
|
|
|
height: 20px;
|
|
|
margin-right: 5px;
|
|
|
float: left;
|
|
|
margin-top: 2px;
|
|
|
- "
|
|
|
- ></span>
|
|
|
+ "></span>
|
|
|
</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
<div>配置排序列数据(拖动调整顺序)</div>
|
|
|
<div style="margin-left: 17px">
|
|
|
- <el-checkbox
|
|
|
- v-model="allCheck"
|
|
|
- label="全选"
|
|
|
- @change="allChecked"
|
|
|
- ></el-checkbox>
|
|
|
+ <el-checkbox v-model="allCheck" label="全选" @change="allChecked"></el-checkbox>
|
|
|
</div>
|
|
|
<div style="padding: 4px; display: flex; justify-content: center">
|
|
|
- <draggable
|
|
|
- v-model="setRowList"
|
|
|
- group="site"
|
|
|
- animation="300"
|
|
|
- @start="onStart"
|
|
|
- @end="onEnd"
|
|
|
- handle=".indraggable"
|
|
|
- >
|
|
|
+ <draggable v-model="setRowList" group="site" animation="300" @start="onStart" @end="onEnd"
|
|
|
+ handle=".indraggable">
|
|
|
<transition-group>
|
|
|
- <div
|
|
|
- v-for="item in setRowList"
|
|
|
- :key="item.surface"
|
|
|
- class="listStyle"
|
|
|
- >
|
|
|
+ <div v-for="item in setRowList" :key="item.surface" class="listStyle">
|
|
|
<div style="width: 500px" class="indraggable">
|
|
|
<div class="progress" :style="{ width: item.width + 'px' }">
|
|
|
- <el-checkbox
|
|
|
- :label="item.name"
|
|
|
- v-model="item.checked"
|
|
|
- :true-label="0"
|
|
|
- :false-label="1"
|
|
|
- >{{ item.name }}
|
|
|
+ <el-checkbox :label="item.name" v-model="item.checked" :true-label="0" :false-label="1">{{ item.name
|
|
|
+ }}
|
|
|
</el-checkbox>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-input-number
|
|
|
- v-model.number="item.width"
|
|
|
- controls-position="right"
|
|
|
- :min="1"
|
|
|
- :max="500"
|
|
|
- size="mini"
|
|
|
- ></el-input-number>
|
|
|
+ <el-input-number v-model.number="item.width" controls-position="right" :min="1" :max="500" size="mini">
|
|
|
+ </el-input-number>
|
|
|
</div>
|
|
|
</transition-group>
|
|
|
</draggable>
|
|
@@ -267,22 +135,10 @@
|
|
|
<el-button @click="uploadVisible = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="importData">确 定</el-button>
|
|
|
</span>
|
|
|
- <el-dialog
|
|
|
- title="选择库位"
|
|
|
- :data="treeselectList"
|
|
|
- :visible.sync="choiceWarehouse"
|
|
|
- width="30%"
|
|
|
- :close-on-click-modal="false"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <treeselect
|
|
|
- v-model="treeselectList.fWarehouselocid"
|
|
|
- @select="getAlltree"
|
|
|
- :options="fWarehouseidOptions"
|
|
|
- :show-count="true"
|
|
|
- :disable-branch-nodes="true"
|
|
|
- placeholder="请选择归属库区"
|
|
|
- />
|
|
|
+ <el-dialog title="选择库位" :data="treeselectList" :visible.sync="choiceWarehouse" width="30%"
|
|
|
+ :close-on-click-modal="false" append-to-body>
|
|
|
+ <treeselect v-model="treeselectList.fWarehouselocid" @select="getAlltree" :options="fWarehouseidOptions"
|
|
|
+ :show-count="true" :disable-branch-nodes="true" placeholder="请选择归属库区" />
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="choiceWarehouse = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="confirm">确 定</el-button>
|
|
@@ -322,7 +178,7 @@ export default {
|
|
|
uploadVisible: false,
|
|
|
excelList: [],
|
|
|
drag: false,
|
|
|
- loading:false,
|
|
|
+ loading: false,
|
|
|
setRowList: [],
|
|
|
getRowList: [],
|
|
|
allCheck: false,
|
|
@@ -358,20 +214,27 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
surface: "5",
|
|
|
+ label: "fCntqty",
|
|
|
+ name: "箱量",
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "6",
|
|
|
label: "fWarehouseInformation",
|
|
|
name: "库区",
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
},
|
|
|
{
|
|
|
- surface: "6",
|
|
|
+ surface: "7",
|
|
|
label: "fQty",
|
|
|
name: "件数",
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
},
|
|
|
{
|
|
|
- surface: "7",
|
|
|
+ surface: "8",
|
|
|
label: "fGrossweight",
|
|
|
name: "毛重(kg)",
|
|
|
checked: 0,
|
|
@@ -379,35 +242,35 @@ export default {
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- surface: "8",
|
|
|
+ surface: "9",
|
|
|
label: "fNetweight",
|
|
|
name: "净重(kg)",
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
},
|
|
|
{
|
|
|
- surface: "9",
|
|
|
+ surface: "10",
|
|
|
label: "fPackagespecs",
|
|
|
name: "包装规格",
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
},
|
|
|
{
|
|
|
- surface: "10",
|
|
|
+ surface: "11",
|
|
|
label: "fElabel",
|
|
|
name: "电子标签",
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
},
|
|
|
{
|
|
|
- surface: "11",
|
|
|
+ surface: "12",
|
|
|
label: "fCntrno",
|
|
|
name: "箱号",
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
},
|
|
|
{
|
|
|
- surface: "12",
|
|
|
+ surface: "13",
|
|
|
label: "fTruckno",
|
|
|
name: "车号",
|
|
|
checked: 0,
|
|
@@ -444,29 +307,33 @@ export default {
|
|
|
})
|
|
|
} else {
|
|
|
this.getRowList.forEach(item => {
|
|
|
- this.$set(item, 'show', item.label == 'fElabel'? false: true);
|
|
|
+ this.$set(item, 'show', item.label == 'fElabel' ? false : true);
|
|
|
})
|
|
|
}
|
|
|
});
|
|
|
this.getRow();
|
|
|
},
|
|
|
methods: {
|
|
|
- dateSelected(scope,name){
|
|
|
- if (name === 'fBsdate'){
|
|
|
+ dateSelected(scope, name) {
|
|
|
+ if (name === 'fBsdate') {
|
|
|
this.excelList.forEach(item => {
|
|
|
- if (!item.fBsdate) this.$set(item,'fBsdate',scope.row.fBsdate)
|
|
|
+ if (!item.fBsdate) this.$set(item, 'fBsdate', scope.row.fBsdate)
|
|
|
})
|
|
|
- }else if (name === 'fGoodsid'){
|
|
|
+ } else if (name === 'fGoodsid') {
|
|
|
this.excelList.forEach(item => {
|
|
|
- if (!item.fGoodsid) this.$set(item,'fGoodsid',scope.row.fGoodsid)
|
|
|
+ if (!item.fGoodsid) this.$set(item, 'fGoodsid', scope.row.fGoodsid)
|
|
|
})
|
|
|
- }else if (name === 'fBusinessType'){
|
|
|
+ } else if (name === 'fBusinessType') {
|
|
|
this.excelList.forEach(item => {
|
|
|
- if (!item.fBusinessType) this.$set(item,'fBusinessType',scope.row.fBusinessType)
|
|
|
+ if (!item.fBusinessType) this.$set(item, 'fBusinessType', scope.row.fBusinessType)
|
|
|
})
|
|
|
- }else if (name === 'fMarks'){
|
|
|
+ } else if (name === 'fMarks') {
|
|
|
this.excelList.forEach(item => {
|
|
|
- if (!item.fMarks) this.$set(item,'fMarks',scope.row.fMarks)
|
|
|
+ if (!item.fMarks) this.$set(item, 'fMarks', scope.row.fMarks)
|
|
|
+ })
|
|
|
+ }else if (name === 'fCntqty') {
|
|
|
+ this.excelList.forEach(item => {
|
|
|
+ if (!item.fCntqty) this.$set(item, 'fCntqty', scope.row.fCntqty)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -480,7 +347,7 @@ export default {
|
|
|
this.fWarehouseidOptions = response.data;
|
|
|
});
|
|
|
},
|
|
|
- progress(event, file, fileList){
|
|
|
+ progress(event, file, fileList) {
|
|
|
this.loading = true
|
|
|
},
|
|
|
handleSucces(res) {
|
|
@@ -690,10 +557,11 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style>
|
|
|
- .el-table__header {
|
|
|
- width: 100%!important;
|
|
|
- }
|
|
|
- .el-table__body {
|
|
|
- width: 100%!important;
|
|
|
- }
|
|
|
+.el-table__header {
|
|
|
+ width: 100% !important;
|
|
|
+}
|
|
|
+
|
|
|
+.el-table__body {
|
|
|
+ width: 100% !important;
|
|
|
+}
|
|
|
</style>
|