|
@@ -47,7 +47,9 @@
|
|
|
<Topsearch :list='setList'
|
|
|
@init='init'
|
|
|
@searchData='init' />
|
|
|
- <Table :max-height='tableHeight'
|
|
|
+ <Table
|
|
|
+ v-if="false"
|
|
|
+ :max-height='tableHeight'
|
|
|
:width="tableWidth"
|
|
|
ref='table'
|
|
|
:loading='loading'
|
|
@@ -80,6 +82,91 @@
|
|
|
type="error">删除</Button>
|
|
|
</template>
|
|
|
</Table>
|
|
|
+ <!-- :width="tableWidth" -->
|
|
|
+ <u-table
|
|
|
+ v-else
|
|
|
+ ref='table'
|
|
|
+
|
|
|
+ :max-height='tableHeight'
|
|
|
+ :loading='loading'
|
|
|
+ style="width:1220px"
|
|
|
+ :data="tableData"
|
|
|
+ use-virtual
|
|
|
+ stripe
|
|
|
+ :row-class-name="rowClassName"
|
|
|
+ :data-changes-scroll-top="false"
|
|
|
+ :row-height="rowHeight"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <u-table-column
|
|
|
+ align="center"
|
|
|
+ fixed="left"
|
|
|
+ type="selection"
|
|
|
+ width="55">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="type" label="存货分类" width="200" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="code" label="存货编码" width="200" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="title" label="存货名称" width="200" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="principal_material" label="主材" width="200" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="mode" label="价格计算方式" width="150">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <span v-if="scope.row.mode == 1">计件</span>
|
|
|
+ <span v-else>计重</span>
|
|
|
+ </template>
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="original_code" label="原料编码" width="200" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="original_title" label="原料名称" width="200" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="specification" label="存货规格" width="150" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="material_length" label="材料长度" width="150" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="unit_title" label="计量单位" width="100" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="wages" label="工价" width="100" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="single" label="单重/kg" width="100" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="loss_factor" label="损耗系数" width="100" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="img_number" label="图号" width="100" align="center">
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column prop="attr" label="存货属性" width="200" align="center">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <span v-for="item in attrList"
|
|
|
+ :key="item.id">
|
|
|
+ <span v-for="_item in scope.row.attr"
|
|
|
+ :key="_item">
|
|
|
+ {{item.id==_item?item.title:''}}
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </u-table-column>
|
|
|
+ <u-table-column
|
|
|
+ prop="remark"
|
|
|
+ label="操作"
|
|
|
+ width="180"
|
|
|
+ align="center"
|
|
|
+ fixed="right"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <Button @click="handleContextMenusys(row.row,2)"
|
|
|
+ style="margin-right:5px"
|
|
|
+ class="margin-map"
|
|
|
+ size='small'
|
|
|
+ type="primary">修改</Button>
|
|
|
+ <Button @click="delItems(row.row)"
|
|
|
+ style="margin-left:5px"
|
|
|
+ size='small'
|
|
|
+ type="error">删除</Button>
|
|
|
+ </template>
|
|
|
+ </u-table-column>
|
|
|
+ </u-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<Modal class-name="vertical-center-modal"
|
|
@@ -202,6 +289,7 @@
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
+ rowHeight: 55,
|
|
|
contextData: '',
|
|
|
showSys: false,
|
|
|
headers: { 'Authorization': localStorage.getItem('token') },
|
|
@@ -339,7 +427,9 @@ export default {
|
|
|
|
|
|
})
|
|
|
this.tableWidth = window.innerWidth - 300 - 400;
|
|
|
+ console.log(this.tableWidth,"这是width");
|
|
|
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 280
|
|
|
+ console.log(this.tableHeight,"这是tableHeight");
|
|
|
window.addEventListener('resize', (e) => {
|
|
|
this.tableWidth = e.target.innerWidth - 300 - 400;
|
|
|
this.$forceUpdate()
|