|
@@ -72,21 +72,21 @@
|
|
|
>
|
|
|
<el-table-column prop="goodsId" label="辅材编号" />
|
|
|
<el-table-column prop="goodsName" label="辅材名称" width="230" />
|
|
|
- <el-table-column prop="estimateCost" label="预估进价" header-align="left" align="center" />
|
|
|
- <el-table-column prop="purchaseQty" label="订货数量" header-align="left" align="center" />
|
|
|
- <el-table-column prop="deliverQty" label="供应数量" header-align="left" align="center">
|
|
|
+ <el-table-column prop="applyCost" label="预估进价" header-align="left" align="center" />
|
|
|
+ <el-table-column prop="applyQty" label="订货数量" header-align="left" align="center" />
|
|
|
+ <el-table-column prop="checkQty" label="供应数量" header-align="left" align="center">
|
|
|
<template slot-scope="{ $index, row }">
|
|
|
- <label v-if="inputParam.openType === 'view'">{{ row.deliverQty + ' /' + row.measureUnit }}</label>
|
|
|
+ <label v-if="inputParam.openType === 'view'">{{ row.checkQty + ' /' + row.goodsStockUnit }}</label>
|
|
|
<el-form-item
|
|
|
v-else
|
|
|
style="margin: 18px 0"
|
|
|
label-width="0"
|
|
|
size="mini"
|
|
|
- :prop="'items.' + $index + '.deliverQty'"
|
|
|
- :rules="dataFormRules.deliverQty"
|
|
|
+ :prop="'items.' + $index + '.checkQty'"
|
|
|
+ :rules="dataFormRules.checkQty"
|
|
|
>
|
|
|
- <el-input v-model="row.deliverQty" size="mini">
|
|
|
- <template slot="suffix">{{ ' /' + row.measureUnit }}</template>
|
|
|
+ <el-input v-model="row.checkQty" size="mini">
|
|
|
+ <template slot="suffix">{{ ' /' + row.goodsStockUnit }}</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
@@ -95,9 +95,8 @@
|
|
|
<el-table-column prop="recQty" label="验收数量" />
|
|
|
<el-table-column prop="recGiftQty" label="验收赠品数量" />
|
|
|
</template>
|
|
|
- <el-table-column prop="measureUnit" label="采购单位" />
|
|
|
- <el-table-column prop="productModel" label="商品型号" />
|
|
|
- <el-table-column prop="specification" label="规格" />
|
|
|
+ <el-table-column prop="goodsStockUnit" label="采购单位" />
|
|
|
+ <el-table-column prop="goodsSpecification" label="规格" />
|
|
|
</el-table>
|
|
|
<el-row>
|
|
|
<el-col :span="24"
|
|
@@ -108,11 +107,11 @@
|
|
|
</el-row>
|
|
|
<div style="text-align: right">
|
|
|
<el-button @click="cancelForm">取 消</el-button>
|
|
|
- <el-button v-if="checkBtn('edit')" type="primary" :disabled="saveBtn" @click="submitForm('edit')"
|
|
|
+ <el-button v-if="$restrict('edit')" type="primary" :disabled="saveBtn" @click="submitForm('edit')"
|
|
|
>保 存</el-button
|
|
|
>
|
|
|
- <el-button v-if="checkBtn('verify')" type="success" @click="verifySheet(dataForm.purchaseId)">核 实</el-button>
|
|
|
- <el-button v-if="checkBtn('revoke')" type="danger" @click="revokeSheet(dataForm.purchaseId)">撤 消</el-button>
|
|
|
+ <el-button v-if="$restrict('verify')" type="success" @click="verifySheet(dataForm.purchaseId)">核 实</el-button>
|
|
|
+ <el-button v-if="$restrict('revoke')" type="danger" @click="revokeSheet(dataForm.purchaseId)">撤 消</el-button>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
</template>
|
|
@@ -141,7 +140,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
- const validateDeliverQty = (rule, value, callback) => {
|
|
|
+ const validatecheckQty = (rule, value, callback) => {
|
|
|
this.saveBtn = true
|
|
|
if (Number.isNaN(parseFloat(value))) {
|
|
|
return callback(new Error('请输入数字值'))
|
|
@@ -165,8 +164,9 @@ export default {
|
|
|
flag: '',
|
|
|
items: [] // 关系辅材列表
|
|
|
},
|
|
|
+ authShop: [],
|
|
|
dataFormRules: {
|
|
|
- deliverQty: [{ validator: validateDeliverQty, trigger: 'blur' }]
|
|
|
+ checkQty: [{ validator: validatecheckQty, trigger: 'blur' }]
|
|
|
},
|
|
|
venderList: [],
|
|
|
saveBtn: false // 保存按钮状态
|
|
@@ -223,6 +223,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
setDataForm(data) {
|
|
|
this.dataForm = {
|
|
|
purchaseId: data.purchaseId, // 单据编号
|
|
@@ -233,16 +234,6 @@ export default {
|
|
|
items: data.items // 关系商品列表
|
|
|
}
|
|
|
},
|
|
|
- checkBtn(type) {
|
|
|
- const typeMap = {
|
|
|
- add: this.inputParam.openType === type,
|
|
|
- edit: this.dataForm.flag === 1 && this.inputParam.openType === type,
|
|
|
- revoke: this.dataForm.flag === 1,
|
|
|
- verify: this.dataForm.flag === 1
|
|
|
- }
|
|
|
- // 检查按钮权限
|
|
|
- return true // this.checkBtnRole(type) && typeMap[type]
|
|
|
- },
|
|
|
|
|
|
// 核实 采购申请单
|
|
|
verifySheet(purchaseId) {
|