|
@@ -26,7 +26,7 @@
|
|
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
|
|
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
|
|
<div>
|
|
<div>
|
|
|
|
|
|
- <el-button v-if="isSubscribeAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
|
|
|
|
|
|
+ <el-button v-if="isSubscribeAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="apply_subscribe">新增</el-button>
|
|
<el-button v-if="isSubscribeSpecial" class="filter-item" type="primary" icon="el-icon-edit" @click="handle_specialSubscription">特殊申购</el-button>
|
|
<el-button v-if="isSubscribeSpecial" class="filter-item" type="primary" icon="el-icon-edit" @click="handle_specialSubscription">特殊申购</el-button>
|
|
<el-button v-if="isSubscribeExport" v-waves class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
|
|
<el-button v-if="isSubscribeExport" v-waves class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
|
|
<el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
|
|
<el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
|
|
@@ -228,6 +228,7 @@
|
|
:fetch-suggestions="sparePartSearch"
|
|
:fetch-suggestions="sparePartSearch"
|
|
placeholder="请输入备件编号或备件名称或备件规格"
|
|
placeholder="请输入备件编号或备件名称或备件规格"
|
|
style="width:100%"
|
|
style="width:100%"
|
|
|
|
+ ref="autocomplete"
|
|
@select="handleSelectSparePart"
|
|
@select="handleSelectSparePart"
|
|
>
|
|
>
|
|
<template slot-scope="{ item }">
|
|
<template slot-scope="{ item }">
|
|
@@ -329,6 +330,8 @@
|
|
<el-input v-model="scope.row.purpose" />
|
|
<el-input v-model="scope.row.purpose" />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <!-- <el-table-column label="使用周期" min-width="120px" align="center" prop="lifeCycle" />
|
|
|
|
+ <el-table-column label="合同差异项" min-width="120px" align="center" prop="contractVarianceItem" /> -->
|
|
<el-table-column
|
|
<el-table-column
|
|
label="操作"
|
|
label="操作"
|
|
align="center"
|
|
align="center"
|
|
@@ -386,8 +389,8 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
- <el-form-item label="申购日期:" prop="createTime">
|
|
|
|
- <el-date-picker v-model="seeTemp.createTime" :picker-options="pickerOptions" type="date" placeholder="申购日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" disabled />
|
|
|
|
|
|
+ <el-form-item label="申购日期:" prop="inputTime">
|
|
|
|
+ <el-date-picker v-model="seeTemp.inputTime" :picker-options="pickerOptions" type="date" placeholder="申购日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" disabled />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" v-if="seeTemp.purchaseType == '2'">
|
|
<el-col :span="8" v-if="seeTemp.purchaseType == '2'">
|
|
@@ -472,11 +475,9 @@
|
|
<el-table-column label="现有库存" sortable prop="storageAmount" align="center" min-width="60" />
|
|
<el-table-column label="现有库存" sortable prop="storageAmount" align="center" min-width="60" />
|
|
<el-table-column label="价格" sortable prop="price" align="center" min-width="60" />
|
|
<el-table-column label="价格" sortable prop="price" align="center" min-width="60" />
|
|
<el-table-column label="申购数量" sortable prop="amount" align="center" min-width="60" />
|
|
<el-table-column label="申购数量" sortable prop="amount" align="center" min-width="60" />
|
|
- <el-table-column label="备注" min-width="110px" align="center">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{ scope.row.purpose }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
+ <!-- <el-table-column label="使用周期" min-width="120px" align="center" prop="lifeCycle" />
|
|
|
|
+ <el-table-column label="合同差异项" min-width="120px" align="center" prop="contractVarianceItem" /> -->
|
|
|
|
+ <el-table-column label="备注" min-width="110px" align="center" prop="purpose" />
|
|
</el-table>
|
|
</el-table>
|
|
<el-form
|
|
<el-form
|
|
ref="seeTemp"
|
|
ref="seeTemp"
|
|
@@ -570,6 +571,56 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
+ <!-- 查看备件 -->
|
|
|
|
+ <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_seepart" :close-on-click-modal="false" width="90%">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input v-model="seepart.getdataListParm.parammaps.partName" placeholder="备件" style="width: 200px;" class="filter-item" />
|
|
|
|
+ <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="seepart_search">搜索</el-button>
|
|
|
|
+ <h3 v-if="seepartList.length == 0" style="text-align: center;height: 300px;line-height:300px;">呆滞库存查询(如可调拨使用,请优先消耗)</h3>
|
|
|
|
+ <div v-else>
|
|
|
|
+ <el-table
|
|
|
|
+ :key="seepart.tableKey"
|
|
|
|
+ v-loading="seepart.listLoading"
|
|
|
|
+ element-loading-text="给我一点时间"
|
|
|
|
+ :data="seepartList"
|
|
|
|
+ border
|
|
|
|
+ fit
|
|
|
|
+ highlight-current-row
|
|
|
|
+ style="width: 100%;margin-bottom:30px;margin-top:20px;"
|
|
|
|
+ :row-style="rowStyle"
|
|
|
|
+ :cell-style="cellStyle"
|
|
|
|
+ class="elTable"
|
|
|
|
+ height="300"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column label="序号" align="center" type="index" width="50px" />
|
|
|
|
+ <el-table-column label="牧场名称" prop="pastureName" align="center" min-width="90" />
|
|
|
|
+ <el-table-column label="备件编号" prop="partCode" align="center" min-width="90" />
|
|
|
|
+ <el-table-column label="备件名称" prop="partName" align="center" min-width="90" />
|
|
|
|
+ <el-table-column label="备件规格" prop="specification" align="center" min-width="90" />
|
|
|
|
+ <el-table-column label="备件图片" prop="picpath" align="center" min-width="90">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-popover placement="right" title="" trigger="hover">
|
|
|
|
+ <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
|
|
|
|
+ <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
|
|
|
|
+ </el-popover>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="备件品牌" prop="brand" align="center" min-width="90" />
|
|
|
|
+ <el-table-column label="计量单位" prop="unit" align="center" min-width="90" />
|
|
|
|
+ <el-table-column label="现有库存" sortable prop="reportery" align="center" min-width="60" />
|
|
|
|
+ <el-table-column label="价格" sortable prop="price" align="center" min-width="60" />
|
|
|
|
+ <el-table-column label="在库天数" sortable prop="daysInStorage" align="center" min-width="60" />
|
|
|
|
+ <el-table-column label="负责人" prop="dutyPersonal" align="center" min-width="90" />
|
|
|
|
+ <el-table-column label="联系方式" prop="telphone" align="center" min-width="90" />
|
|
|
|
+ </el-table>
|
|
|
|
+ <pagination v-show="seepart.total>0" :total="seepart.total" :page.sync="seepart.getdataListParm.offset" :limit.sync="seepart.getdataListParm.pagecount" @pagination="get_seepart_data" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" :disabled="isokDisable" @click="form_add()">继续申购</el-button>
|
|
|
|
+ <el-button @click="dialogFormVisible_seepart = false;">取消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -616,13 +667,14 @@ export default {
|
|
textMap: {
|
|
textMap: {
|
|
update: '编辑',
|
|
update: '编辑',
|
|
create: '新增',
|
|
create: '新增',
|
|
- see: '查看/特殊申购l',
|
|
|
|
|
|
+ see: '查看',
|
|
examine1: '审核1',
|
|
examine1: '审核1',
|
|
examine2: '审核2',
|
|
examine2: '审核2',
|
|
examine3: '审核3',
|
|
examine3: '审核3',
|
|
examine4: '审核4',
|
|
examine4: '审核4',
|
|
examine5: '审核5',
|
|
examine5: '审核5',
|
|
- special: '特殊申购'
|
|
|
|
|
|
+ special: '特殊申购',
|
|
|
|
+ seepart:'备件申购'
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
equipmentName: [{ required: true, message: '必填', trigger: 'blur' }]
|
|
equipmentName: [{ required: true, message: '必填', trigger: 'blur' }]
|
|
@@ -736,6 +788,22 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
providerList:[],
|
|
providerList:[],
|
|
|
|
+ dialogFormVisible_seepart:false,
|
|
|
|
+ seepartList:[],
|
|
|
|
+ seepart:{
|
|
|
|
+ tableKey: 0,
|
|
|
|
+ listLoading: true,
|
|
|
|
+ total: 0,
|
|
|
|
+ getdataListParm: {
|
|
|
|
+ page: 1, offset: 1, pagecount: 10,
|
|
|
|
+ name:'getIdleSpareParts',
|
|
|
|
+ parammaps:{
|
|
|
|
+ partName:''
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ apply_subscribeData:{},
|
|
|
|
+ isApplyEx4:true,
|
|
myHeight:document.documentElement.clientHeight - 85- 150
|
|
myHeight:document.documentElement.clientHeight - 85- 150
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -983,6 +1051,7 @@ export default {
|
|
this.getCreateDepartDownList()
|
|
this.getCreateDepartDownList()
|
|
this.dialogStatus = 'create'
|
|
this.dialogStatus = 'create'
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
|
|
+ this.dialogFormVisible_seepart = false
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.$refs['createTemp'].clearValidate()
|
|
this.$refs['createTemp'].clearValidate()
|
|
})
|
|
})
|
|
@@ -1049,6 +1118,37 @@ export default {
|
|
if(this.dialogStatus==='special' && this.createTemp.purchaseType == '1' && this.createTemp.providerId == ''){
|
|
if(this.dialogStatus==='special' && this.createTemp.purchaseType == '1' && this.createTemp.providerId == ''){
|
|
this.createTemp.providerId = item.providerId
|
|
this.createTemp.providerId = item.providerId
|
|
}
|
|
}
|
|
|
|
+ this.public_select(item)
|
|
|
|
+ },
|
|
|
|
+ apply_subscribe(){
|
|
|
|
+ this.dialogStatus = 'seepart'
|
|
|
|
+ this.seepartList = []
|
|
|
|
+ console.log(this.seepartList.length,'===')
|
|
|
|
+ this.dialogFormVisible_seepart = true
|
|
|
|
+ // this.apply_subscribeData = item
|
|
|
|
+ },
|
|
|
|
+ seepart_search(){
|
|
|
|
+ this.get_seepart_data()
|
|
|
|
+ },
|
|
|
|
+ get_seepart_data() {
|
|
|
|
+ this.seepart.listLoading = true
|
|
|
|
+ GetDataByName(this.seepart.getdataListParm).then(response => {
|
|
|
|
+ if (response.data.list !== null) {
|
|
|
|
+ console.log('table数据', response.data.list)
|
|
|
|
+ this.seepartList = response.data.list
|
|
|
|
+ this.seepart.pageNum = response.data.pageNum
|
|
|
|
+ this.seepart.pageSize = response.data.pageSize
|
|
|
|
+ } else {
|
|
|
|
+ this.seepartList = []
|
|
|
|
+ }
|
|
|
|
+ this.seepart.total = response.data.total
|
|
|
|
+
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.seepart.listLoading = false
|
|
|
|
+ }, 100)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ public_select(item){
|
|
if (this.createTemp.providerId == '') {
|
|
if (this.createTemp.providerId == '') {
|
|
if (this.listAdd.length > 0) {
|
|
if (this.listAdd.length > 0) {
|
|
if (this.listAdd.find(obj => obj.partId == item.partId)) {
|
|
if (this.listAdd.find(obj => obj.partId == item.partId)) {
|
|
@@ -1145,7 +1245,7 @@ export default {
|
|
}
|
|
}
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
}
|
|
}
|
|
- console.log(this.listAdd,'this.listAdd')
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
add_dialog_save() {
|
|
add_dialog_save() {
|
|
this.isokDisable = true
|
|
this.isokDisable = true
|
|
@@ -1190,12 +1290,13 @@ export default {
|
|
return false
|
|
return false
|
|
} else {
|
|
} else {
|
|
if (parseFloat(this.listAdd[j].price) == 0) {
|
|
if (parseFloat(this.listAdd[j].price) == 0) {
|
|
- this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
|
|
|
|
|
|
+ this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
|
|
return false
|
|
return false
|
|
} else {
|
|
} else {
|
|
- var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
|
|
|
|
|
|
+ // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
|
|
|
|
+ var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
|
|
if (rulesPrice.test(this.listAdd[j].price) == false) {
|
|
if (rulesPrice.test(this.listAdd[j].price) == false) {
|
|
- this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
|
|
|
|
|
|
+ this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1286,6 +1387,12 @@ export default {
|
|
},
|
|
},
|
|
// 查看
|
|
// 查看
|
|
form_see(row) {
|
|
form_see(row) {
|
|
|
|
+ // 查看/特殊申购
|
|
|
|
+ if(row.purchase_type == 1 || row.purchase_type == 3){
|
|
|
|
+ this.textMap.see = '特殊申购'
|
|
|
|
+ }else{
|
|
|
|
+ this.textMap.see = '查看'
|
|
|
|
+ }
|
|
this.dialogStatus = 'see'
|
|
this.dialogStatus = 'see'
|
|
this.dialogFormVisibleSee = true
|
|
this.dialogFormVisibleSee = true
|
|
this.seeTemp = Object.assign({}, row)
|
|
this.seeTemp = Object.assign({}, row)
|
|
@@ -1293,13 +1400,14 @@ export default {
|
|
console.log('查看上方数据(从table读取)', this.seeTemp)
|
|
console.log('查看上方数据(从table读取)', this.seeTemp)
|
|
this.listSee = []
|
|
this.listSee = []
|
|
this.getdataListSee.parammaps.id = this.seeTemp.id
|
|
this.getdataListSee.parammaps.id = this.seeTemp.id
|
|
|
|
+ this.isApplyEx4 = false
|
|
this.getSeeList()
|
|
this.getSeeList()
|
|
|
|
+ },
|
|
|
|
+ getFlowPath(){
|
|
// 流程图
|
|
// 流程图
|
|
var reason = '未通过原因:' + this.seeTemp.workflowNote
|
|
var reason = '未通过原因:' + this.seeTemp.workflowNote
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
if (this.seeTemp.purchase_type < 0 || this.seeTemp.purchase_type == 0 ) {
|
|
if (this.seeTemp.purchase_type < 0 || this.seeTemp.purchase_type == 0 ) {
|
|
|
|
+ if(this.isApplyEx4 == true){
|
|
if (this.seeTemp.statue === 2) {
|
|
if (this.seeTemp.statue === 2) {
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '场长审核' },{ title: '采购审核' }]
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '场长审核' },{ title: '采购审核' }]
|
|
this.active = 1
|
|
this.active = 1
|
|
@@ -1322,8 +1430,8 @@ export default {
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '场长审核' }, { title: '采购审核' }]
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '场长审核' }, { title: '采购审核' }]
|
|
this.active = 4
|
|
this.active = 4
|
|
} else if (this.seeTemp.statue === 11) {
|
|
} else if (this.seeTemp.statue === 11) {
|
|
- this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }]
|
|
|
|
- this.active = 5
|
|
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }]
|
|
|
|
+ this.active = 5
|
|
} else if (this.seeTemp.statue === 12) {
|
|
} else if (this.seeTemp.statue === 12) {
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核' , date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson, status: 'error', reason: reason }, { title: '采购审核' }]
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核' , date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson, status: 'error', reason: reason }, { title: '采购审核' }]
|
|
this.active = 5
|
|
this.active = 5
|
|
@@ -1335,11 +1443,46 @@ export default {
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson },{ title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson },{ title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
|
|
this.active = 6
|
|
this.active = 6
|
|
}
|
|
}
|
|
|
|
+ }else{
|
|
|
|
+ if (this.seeTemp.statue === 2) {
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '采购审核' }]
|
|
|
|
+ this.active = 1
|
|
|
|
+ } else if (this.seeTemp.statue === 3) {
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
|
|
|
|
+ this.active = 2
|
|
|
|
+ } else if (this.seeTemp.statue === 4) {
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
|
|
|
|
+ this.active = 2
|
|
|
|
+ } else if (this.seeTemp.statue === 9) {
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核' }, { title: '采购审核' }]
|
|
|
|
+ this.active = 3
|
|
|
|
+ } else if (this.seeTemp.statue === 10) {
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson, status: 'error', reason: reason }, { title: '供应主管审核' }, { title: '采购审核' }]
|
|
|
|
+ this.active = 3
|
|
|
|
+ } else if (this.seeTemp.statue === 5) {
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
|
|
|
|
+ this.active = 4
|
|
|
|
+ } else if (this.seeTemp.statue === 6) {
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '采购审核' }]
|
|
|
|
+ this.active = 4
|
|
|
|
+ } else if (this.seeTemp.statue === 11) {
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
|
|
|
|
+ this.active = 4
|
|
|
|
+ } else if (this.seeTemp.statue === 12) {
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
|
|
|
|
+ this.active = 4
|
|
|
|
+ } else if (this.seeTemp.statue === 7) {
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
|
|
|
|
+ this.active = 6
|
|
|
|
+ } else if (this.seeTemp.statue === 8) {
|
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
|
|
|
|
+ this.active = 6
|
|
|
|
+ }
|
|
|
|
+ }
|
|
} else if(this.seeTemp.purchase_type == 3){
|
|
} else if(this.seeTemp.purchase_type == 3){
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }]
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }]
|
|
this.active = 1
|
|
this.active = 1
|
|
}else {
|
|
}else {
|
|
- // 待写
|
|
|
|
if (this.seeTemp.statue === 2) {
|
|
if (this.seeTemp.statue === 2) {
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '财务审核' },{ title: '场长审核' },{ title: '采购审核' }]
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '财务审核' },{ title: '场长审核' },{ title: '采购审核' }]
|
|
this.active = 1
|
|
this.active = 1
|
|
@@ -1381,15 +1524,44 @@ export default {
|
|
this.active = 7
|
|
this.active = 7
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
getSeeList() {
|
|
getSeeList() {
|
|
|
|
+ this.listLoadingSee = true
|
|
GetDataByName(this.getdataListSee).then(response => {
|
|
GetDataByName(this.getdataListSee).then(response => {
|
|
if (response.data.list !== null) {
|
|
if (response.data.list !== null) {
|
|
console.log('查看下方table数据', response.data.list)
|
|
console.log('查看下方table数据', response.data.list)
|
|
this.listSee = response.data.list
|
|
this.listSee = response.data.list
|
|
this.listAdd = response.data.list
|
|
this.listAdd = response.data.list
|
|
|
|
+ var sumPrices = 0
|
|
|
|
+ response.data.list.forEach(function(i,j){
|
|
|
|
+ sumPrices = sumPrices + (parseFloat(i.price1) *parseFloat(i.amount) )
|
|
|
|
+ })
|
|
|
|
+ console.log("总价sumPrices",sumPrices)
|
|
|
|
+ var priceObj = false
|
|
|
|
+ var priceArr = []
|
|
|
|
+ response.data.list.forEach(function(i,j){
|
|
|
|
+ if(parseFloat(i.price1) >= 500){
|
|
|
|
+ priceArr.push(true)
|
|
|
|
+ }else{
|
|
|
|
+ priceArr.push(false)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ if (priceArr.includes(true)) {
|
|
|
|
+ priceObj = true
|
|
|
|
+ } else {
|
|
|
|
+ priceObj = false
|
|
|
|
+ }
|
|
|
|
+ console.log("priceObj",priceObj)
|
|
|
|
+ //总价大于2000 或单价>500
|
|
|
|
+ if(sumPrices >= 2000 || priceObj){
|
|
|
|
+ this.isApplyEx4 = true
|
|
|
|
+ this.getFlowPath()
|
|
|
|
+ } else {
|
|
|
|
+ this.isApplyEx4 = false
|
|
|
|
+ this.getFlowPath()
|
|
|
|
+ }
|
|
|
|
+
|
|
for (let i = 0; i < response.data.list.length; i++) {
|
|
for (let i = 0; i < response.data.list.length; i++) {
|
|
if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
|
|
if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
|
|
console.log(process.env.VUE_APP_BASE_API + response.data.list[i].srcpath, '=======1')
|
|
console.log(process.env.VUE_APP_BASE_API + response.data.list[i].srcpath, '=======1')
|
|
@@ -1406,8 +1578,6 @@ export default {
|
|
this.listAdd[i].srcpath = ''
|
|
this.listAdd[i].srcpath = ''
|
|
this.listAdd[i].picpath = ''
|
|
this.listAdd[i].picpath = ''
|
|
}
|
|
}
|
|
- console.log(process.env.VUE_APP_BASE_API)
|
|
|
|
- console.log(this.listSee, '============')
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (response.data.total) {
|
|
if (response.data.total) {
|
|
@@ -1467,12 +1637,13 @@ export default {
|
|
return false
|
|
return false
|
|
} else {
|
|
} else {
|
|
if (parseFloat(this.listAdd[j].price) == 0) {
|
|
if (parseFloat(this.listAdd[j].price) == 0) {
|
|
- this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
|
|
|
|
|
|
+ this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
|
|
return false
|
|
return false
|
|
} else {
|
|
} else {
|
|
- var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
|
|
|
|
|
|
+ // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
|
|
|
|
+ var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
|
|
if (rulesPrice.test(this.listAdd[j].price) == false) {
|
|
if (rulesPrice.test(this.listAdd[j].price) == false) {
|
|
- this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
|
|
|
|
|
|
+ this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1768,17 +1939,21 @@ export default {
|
|
this.examineTemp = this.seeTemp
|
|
this.examineTemp = this.seeTemp
|
|
this.$set(this.seeTemp, 'statue', 1)
|
|
this.$set(this.seeTemp, 'statue', 1)
|
|
this.$set(this.seeTemp, 'workflowNote', '')
|
|
this.$set(this.seeTemp, 'workflowNote', '')
|
|
|
|
+ this.getdataListSee.parammaps.id = this.seeTemp.id
|
|
} else {
|
|
} else {
|
|
this.examineTemp = Object.assign({}, row)
|
|
this.examineTemp = Object.assign({}, row)
|
|
|
|
+ this.getdataListSee.parammaps.id = this.examineTemp.id
|
|
this.$set(this.examineTemp, 'statue', 1)
|
|
this.$set(this.examineTemp, 'statue', 1)
|
|
this.$set(this.examineTemp, 'workflowNote', '')
|
|
this.$set(this.examineTemp, 'workflowNote', '')
|
|
}
|
|
}
|
|
|
|
+ this.getSeeList()
|
|
this.dialogStatus = 'examine3'
|
|
this.dialogStatus = 'examine3'
|
|
this.dialogFormVisible_Examine = true
|
|
this.dialogFormVisible_Examine = true
|
|
this.statueReason = false
|
|
this.statueReason = false
|
|
},
|
|
},
|
|
createExamineData3() {
|
|
createExamineData3() {
|
|
console.log('点击了供应主管审核')
|
|
console.log('点击了供应主管审核')
|
|
|
|
+ console.log(this.isApplyEx4,'=====')
|
|
this.isokDisable = true
|
|
this.isokDisable = true
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.isokDisable = false
|
|
this.isokDisable = false
|
|
@@ -1790,12 +1965,30 @@ export default {
|
|
this.requestParam.parammaps = {}
|
|
this.requestParam.parammaps = {}
|
|
this.requestParam.parammaps.id = this.examineTemp.id
|
|
this.requestParam.parammaps.id = this.examineTemp.id
|
|
if (this.examineTemp.statue == 1) {
|
|
if (this.examineTemp.statue == 1) {
|
|
- this.requestParam.parammaps.statue = 5
|
|
|
|
|
|
+ if(this.examineTemp.purchase_type !== 1 && this.examineTemp.purchase_type !== 3){
|
|
|
|
+ console.log(this.isApplyEx4,'=====')
|
|
|
|
+ if(this.isApplyEx4 == true){
|
|
|
|
+ this.requestParam.parammaps.statue = 5
|
|
|
|
+ }else{
|
|
|
|
+ this.requestParam.parammaps.statue = 11
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ this.requestParam.parammaps.statue = 5
|
|
|
|
+ }
|
|
} else if (this.examineTemp.statue == 2) {
|
|
} else if (this.examineTemp.statue == 2) {
|
|
- this.requestParam.parammaps.statue = 6
|
|
|
|
|
|
+ if(this.examineTemp.purchase_type !== 1 && this.examineTemp.purchase_type !== 3){
|
|
|
|
+ if(this.isApplyEx4 == true){
|
|
|
|
+ this.requestParam.parammaps.statue = 6
|
|
|
|
+ }else{
|
|
|
|
+ this.requestParam.parammaps.statue = 12
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ this.requestParam.parammaps.statue = 6
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.requestParam.parammaps.empId = Cookies.get('employeid')
|
|
this.requestParam.parammaps.empId = Cookies.get('employeid')
|
|
this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
|
|
this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
|
|
|
|
+ // return false
|
|
PostDataByName(this.requestParam).then(response => {
|
|
PostDataByName(this.requestParam).then(response => {
|
|
console.log('审核确认发送参数', this.requestParam)
|
|
console.log('审核确认发送参数', this.requestParam)
|
|
this.isokDisable = false
|
|
this.isokDisable = false
|
|
@@ -2074,12 +2267,13 @@ export default {
|
|
return false
|
|
return false
|
|
} else {
|
|
} else {
|
|
if (parseFloat(this.listAdd[j].price) == 0) {
|
|
if (parseFloat(this.listAdd[j].price) == 0) {
|
|
- this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
|
|
|
|
|
|
+ this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
|
|
return false
|
|
return false
|
|
} else {
|
|
} else {
|
|
- var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
|
|
|
|
|
|
+ // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
|
|
|
|
+ var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
|
|
if (rulesPrice.test(this.listAdd[j].price) == false) {
|
|
if (rulesPrice.test(this.listAdd[j].price) == false) {
|
|
- this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
|
|
|
|
|
|
+ this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
}
|