This commit is contained in:
caoxinyu
2019-09-29 17:36:11 +08:00
parent b4e82fa4f7
commit 392d7f7d79
8 changed files with 831 additions and 36 deletions

View File

@@ -603,7 +603,7 @@
</table>
</div>
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px" width="700px">
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px" width="700px">
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
<el-row>
<el-col :span="12">
@@ -709,10 +709,10 @@
</el-form>
</el-dialog>
<el-dialog :visible.sync="dialogVisible2" :title="title2" center style="min-height: 300px" width="400px">
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" :title="title2" center style="min-height: 300px" width="400px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px">
<el-form-item label="询价单号" prop="inquirySheetNum">
<el-input v-model="form2.inquirySheetNum" readonly size="small"/>
<el-input v-model="form2.inquirySheetNum" size="small"/>
</el-form-item>
<el-form-item label="供应商" prop="supplierNameValue">
<el-select v-model="form2.supplierNameValue" style="width:200px" placeholder="供应商" size="small" filterable>
@@ -742,7 +742,7 @@
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible3" title="物料变更选择" center style="min-height: 300px;" width="780px">
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible3" title="物料变更选择" center style="min-height: 300px;" width="780px">
<el-row style="margin-bottom: 10px">
<span>物料名称:</span>
<el-input v-model="materialName0" placeholder="物料名称" size="small" clearable/>
@@ -790,7 +790,7 @@
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible4" title="使用滞货" center style="min-height: 300px;" width="400px">
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible4" title="使用滞货" center style="min-height: 300px;" width="400px">
<span>使用滞货数量:</span>
<el-input-number :min="0" :max="maxUseNumber" v-model="useNumber" controls-position="right"/>
<div style="margin: 10px 0 0 10px;color: red">注意:确定后将不可取消使用滞货</div>
@@ -1538,8 +1538,7 @@ export default {
this.$refs['form2'].validate((valid) => {
if (valid) {
createInquirySheet(this.form2.inquirySheetNum, this.id, this.form2.supplierNameValue, '').then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
if (!(response.data)) {
this.$message.success('创建成功')
this.form2.supplierNameValue = ''
this.inquirySheetNum = ''
@@ -1547,7 +1546,7 @@ export default {
this.supplierValue = ''
this.dialogVisible2 = false
this.searchTable2()
} else { this.$message.error('操作失败') }
} else { this.$message.error('操作失败!该询价单已存在,请重新输入') }
})
}
})

View File

@@ -276,14 +276,17 @@
size="small"
style="margin-left: 10px"
@click="addOfflineContract">创建离线合同</el-button>
<el-button
type="warning"
size="small"
style="margin-left: 10px"
@click="addMateriel">选入物料</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top">
<el-button
type="warning"
size="small"
style="margin-left: 10px"
@click="addMateriel">选入物料</el-button>
</el-tooltip>
</div>
<el-table v-loading="" :data="tableData2" border style="max-height: 460px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column type="expand" fixed="left">
<el-table-column label="详情" type="expand" fixed="left">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
<el-form-item label="离线合同备注">
@@ -368,8 +371,9 @@
<el-button v-if="quickChangePrice" size="mini" style="float:right;" @click="quickChangePrice=!quickChangePrice">快速修改价格</el-button>
<el-button v-else size="mini" style="float:right;" @click="quickChangePrice=!quickChangePrice">还原</el-button>
</div>
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 500px;" height="500px" size="mini" show-summary>
<el-table-column label="离线合同编号" align="center" min-width="150">
<!--<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" width="110">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
@@ -395,7 +399,7 @@
<b v-else>{{ scope.row.数量 }}</b>
</template>
</el-table-column>
<el-table-column label="单位" align="center" min-width="100">
<el-table-column label="单位" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.计量单位 }}
</template>

View File

@@ -41,6 +41,19 @@
<b style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</b>
</el-option>
</el-select>
<span>时间段:</span>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:300px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button
type="success"
size="small"
@@ -70,18 +83,22 @@
<span style="margin-right: -10px">物料状态:</span>
<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" size="small" style="margin-left: 10px"/>
<div style="float:right;padding-top:10px;">
<el-button
type="primary"
size="small"
icon="el-icon-menu"
style="margin-left: 10px"
@click="allocateTask1">分配</el-button>
<el-button
type="danger"
size="small"
icon="el-icon-back"
style="margin-left: 10px"
@click="executeReturn1">退回</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="选择采购员后,将物料分配给所选的采购员" placement="top">
<el-button
type="primary"
size="small"
icon="el-icon-menu"
style="margin-left: 10px"
@click="allocateTask1">分配</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="退回勾选的未分配的物料至车间" placement="top">
<el-button
type="danger"
size="small"
icon="el-icon-back"
style="margin-left: 10px"
@click="executeReturn1">退回</el-button>
</el-tooltip>
</div>
</el-row>
<el-row style="margin-bottom: 15px">
@@ -646,6 +663,34 @@ export default {
name: '', // 采购任务分配
data() {
return {
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', [start, end])
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit('pick', [start, end])
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit('pick', [start, end])
}
}]
},
dateRange: '',
timer2: '',
machines: [],
source: [
@@ -861,13 +906,14 @@ export default {
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
this.projectValue ? this.check3 = 1 : this.check3 = 0
let check0, check1, check2, check3
let check0, check1, check2, check3, check4
this.machineValue ? check0 = 1 : check0 = 0
this.groupValue ? check1 = 1 : check1 = 0
this.materialName ? this.check4 = 1 : this.check4 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
searchTable1(this.pageCurrent0, this.pageSize0, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1], check2, this.materialSpec, check3, this.materialModel, 1).then(response => {
this.dateRange ? check4 = 1 : (check4 = 0, this.dateRange = '')
searchTable1(this.pageCurrent0, this.pageSize0, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1], check2, this.materialSpec, check3, this.materialModel, 1, check4, this.dateRange[0], this.dateRange[1]).then(response => {
this.tableData0 = response.data.rows
this.total0 = response.data.total
})