刘璐珈

This commit is contained in:
Vergil
2020-03-09 17:18:31 +08:00
parent 8d4607b5ca
commit c2d4e64c35
21 changed files with 998 additions and 350 deletions

View File

@@ -39,84 +39,84 @@
<el-button slot="reference" type="success" size="small" plain style="float: right;margin-right: 20px">调整采购任务</el-button>
</el-popover>
</el-row>
<!--:row-class-name="tableRowClassName"-->
<el-table
v-loading=""
:data="tableData00"
:row-class-name="tableRowClassName"
border
style="width: 100%;max-height: 500px;"
height="500px"
size="mini"
@selection-change="handleSelectionChange1"
@select="handleSelection">
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
<el-table-column :selectable="selectable" align="center" width="43" type="selection"/>
<el-table-column label="名称" align="center" prop="物料名称" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" prop="物料规格" min-width="120" show-overflow-tooltip>
<el-table-column label="规格" align="center" prop="物料规格" width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="型号" prop="物料型号" align="center" min-width="100" show-overflow-tooltip>
<el-table-column label="型号" prop="物料型号" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" min-width="120" show-overflow-tooltip>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供货商 === '0' ? '-' : scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="机床图号" prop="机床图号" align="center" min-width="100" show-overflow-tooltip>
<el-table-column label="机床图号" prop="机床图号" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" min-width="50">
<el-table-column label="组号" prop="组号" align="center" width="50">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="物料类别" align="center" min-width="80">
<el-table-column label="物料类别" align="center" width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料类别 }}
</template>
</el-table-column>
<el-table-column label="物料品种" prop="物料品种" align="center" min-width="70">
<el-table-column label="物料品种" prop="物料品种" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料品种 }}
</template>
</el-table-column>
<el-table-column label="分配数量" align="center" min-width="70" prop="零件数量">
<el-table-column label="分配数量" align="center" width="80" prop="零件数量">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="库存(BZ)" align="center" min-width="70" prop="库存">
<el-table-column label="库存(BZ)" align="center" width="80" prop="库存">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? scope.row.库存 = Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量) : '-' }}
</template>
</el-table-column>
<el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数">
<el-table-column label="使用库存数量" align="center" width="105" prop="使用库存数">
<template slot-scope="scope">
<span v-if="Number(scope.row.零件类型) !== 1">-</span>
<el-input-number v-if="Number(scope.row.零件类型) === 1" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="待采数量" align="center" min-width="70" prop="待采购数量">
<el-table-column label="待采数量" align="center" width="80" prop="待采购数量">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用库存数) : scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
</template>
</el-table-column>
<el-table-column label="使用滞货数量" align="center" min-width="100" prop="使用滞货数量">
<el-table-column label="使用滞货数量" align="center" width="110" prop="使用滞货数量">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? Number(scope.row.使用滞货数量) : '-' }}
</template>
</el-table-column>
<el-table-column label="使用滞货" align="center" min-width="70">
<el-table-column label="使用滞货" align="center" width="80">
<template slot-scope="scope">
<template v-if="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0">
@@ -124,7 +124,7 @@
<el-button v-else :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0" icon="el-icon-goods" plain type="primary" size="mini" @click="useInventory(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="可用滞货数量" align="center" min-width="100">
<el-table-column label="可用滞货数量" align="center" width="110">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 2 ? Number(scope.row.滞货数量) : '-' }}
</template>
@@ -134,7 +134,7 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="来源" min-width="60px" prop="零件类型筛选">
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="来源" width="70px" prop="零件类型筛选">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
</template>
@@ -156,6 +156,7 @@
@size-change="handleSizeChange11"
@current-change="handleCurrentChange11"/>
</div>
<!--:row-class-name="tableRowClassName2"-->
</el-tab-pane>
<el-tab-pane label="仓库" name="仓库">
<el-row>
@@ -165,7 +166,6 @@
<el-table
v-loading=""
:data="tableData22"
:row-class-name="tableRowClassName2"
border
stripe
style="width: 100%;max-height: 500px;"
@@ -213,8 +213,8 @@
<el-card>
<div slot="header">
<el-input v-model="offlineContract" placeholder="离线合同号" size="small" style="width: 140px" clearable/>
<el-input v-model="supplierName0" placeholder="供应商" size="small" style="width: 140px" clearable/>
<el-input v-model="offlineContract" placeholder="离线合同号/供应商" size="small" style="width: 170px" clearable/>
<!--<el-input v-model="supplierName0" placeholder="供应商" size="small" style="width: 140px" clearable/>-->
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10000;total2=0;searchTable2()">查询</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top">
<el-button type="warning" size="small" plain style="margin-left: 40px" @click="addMateriel">选入物料</el-button>
@@ -303,7 +303,7 @@
</div>
<!--<h3>合同详细信息</h3>-->
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 500px;" height="450px" size="mini" show-summary>
<el-table-column label="物料名称" align="center" min-width="150" show-overflow-tooltip>
<el-table-column label="物料名称" align="center" width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
</template>
@@ -313,12 +313,12 @@
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="200" show-overflow-tooltip>
<el-table-column label="图号或型号" align="center" width="140" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="数" align="center" min-width="100">
<el-table-column label="采购数" align="center" width="90">
<template slot-scope="scope">
<el-input v-direction="{x: 0, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.数量" :disabled="disable" size="mini" style="width:60px" @change="saveContract()"/>
<b v-else>{{ scope.row.数量 }}</b>
@@ -329,29 +329,29 @@
{{ scope.row.计量单位 }}
</template>
</el-table-column>
<el-table-column label="参考价格" align="center" min-width="70">
<el-table-column label="参考价格" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.参考价格 }}
</template>
</el-table-column>
<el-table-column label="单价(未税)" align="center" width="110" prop="单价">
<el-table-column label="单价(未税)" align="center" width="110" prop="单价">
<template slot-scope="scope">
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='未税'" v-model="scope.row.未税单价" :disabled="disable" size="mini" style="width:70px" @change="saveContract()"/>
<b v-show="hasTax!=='未税'">{{ (scope.row.单价 / (1 + taxRate)).toFixed(2) }}</b>
</template>
</el-table-column>
<el-table-column label="单价(含税)" align="center" min-width="140" prop="单价">
<el-table-column label="单价(含税)" align="center" width="110" prop="单价">
<template slot-scope="scope">
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.单价" :disabled="disable" size="mini" style="width:120px" @change="saveContract()"/>
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.单价" :disabled="disable" size="mini" style="width:90px" @change="saveContract()"/>
<b v-show="hasTax!=='含税'">{{ (scope.row.未税单价 * (1 + taxRate)).toFixed(2) }}</b>
</template>
</el-table-column>
<el-table-column label="总额(未税)" align="center" width="110" prop="合计">
<el-table-column label="总额(未税)" align="center" width="110" prop="合计">
<template slot-scope="scope">
{{ hasTax==='未税' ? scope.row.未税总额 = (Number(scope.row.数量) * Number(scope.row.未税单价)).toFixed(2) : scope.row.未税总额 = (scope.row.含税总额 / (1+taxRate)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="总额(含税)" align="center" width="110" prop="合计">
<el-table-column label="总额(含税)" align="center" width="110" prop="合计">
<template slot-scope="scope">
{{ hasTax==='含税' ? scope.row.含税总额 = (Number(scope.row.数量) * Number(scope.row.单价)).toFixed(2) : scope.row.含税总额 = (scope.row.未税总额 * (1+taxRate)).toFixed(2) }}
</template>
@@ -362,9 +362,9 @@
<b v-else>{{ scope.row.备注 || '—' }}</b>
</template>
</el-table-column>
<el-table-column label="交货期" align="center" min-width="130" prop="交货期要求">
<el-table-column label="交货期要求" align="center" min-width="130" prop="交货期要求">
<template slot-scope="scope">
<el-input v-direction="{x: 2, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.交货要求" :disabled="disable" size="mini" style="width:90px" @change="saveContract()"/>
<el-input v-direction="{x: 2, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.交货要求" :disabled="disable" size="mini" style="width:90px" @change="saveContract()"/>
<b v-else>{{ scope.row.交货期要求 || '—' }}</b>
</template>
</el-table-column>
@@ -410,7 +410,7 @@
<td>单价</td>
<td>单位</td>
<td colspan="2">合计</td>
<td>交货</td>
<td>交货要求</td>
<td colspan="2">备注</td>
</tr>
<tr>
@@ -581,15 +581,15 @@
<div slot="footer" class="dialog-footer">
<el-button
v-show="title2==='创建离线合同'"
type="primary"
type="distribution"
size="small"
icon="el-icon-check"
icon="el-icon-circle-check"
@click="submitAddOfflineContract">确定</el-button>
<el-button
v-show="title2==='编辑离线合同'"
type="primary"
type="distribution"
size="small"
icon="el-icon-check"
icon="el-icon-circle-check"
@click="submitEditOfflineContract">确定</el-button>
</div>
</el-dialog>
@@ -1568,7 +1568,6 @@ export default {
if (this.tabName === '外购件') { this.partType = 2 }
if (this.tabName === '标准件') { this.partType = 1 }
searchMaterial1(this.pageCurrent11, this.pageSize11, check1, this.materialName, this.id, check5, this.machineValue, check7, this.startTime[0], this.startTime[1]).then(response => {
console.log(response.data, 111222)
this.tableData00 = response.data.rows
this.total11 = response.data.total
const remark = []