|
@@ -93,12 +93,19 @@
|
|
|
v-if="record.auditState=='WAIT'&&$hasPermissions('B_costSetAudit')"
|
|
|
@click="handleAudit([record.supplierProductSn])"
|
|
|
>审核</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-warning"
|
|
|
+ v-if="record.auditState=='WAIT'&&$hasPermissions('B_costSetting')"
|
|
|
+ @click="handleCostSet(record,editFlag = true)"
|
|
|
+ >编辑</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-warning"
|
|
|
v-if="record.auditState!='WAIT'&&$hasPermissions('B_costSetting')"
|
|
|
- @click="handleCostSet(record)"
|
|
|
+ @click="handleCostSet(record,false)"
|
|
|
>设置成本</a-button>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -108,7 +115,7 @@
|
|
|
<!-- 新增 -->
|
|
|
<addProductModal :openModal="newProduct" @close="newProduct=false" @ok="handleProductsOk" />
|
|
|
<!-- 设置成本价 -->
|
|
|
- <SettingCost ref="settingCost" :openModal="openSetModal" @ok="$refs.table.refresh()" @close="openSetModal=false"></SettingCost>
|
|
|
+ <SettingCost ref="settingCost" :edit="editFlag" :openModal="openSetModal" @ok="$refs.table.refresh()" @close="openSetModal=false"></SettingCost>
|
|
|
<!-- 导入产品 -->
|
|
|
<importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="handleGuideOk" />
|
|
|
</a-card>
|
|
@@ -125,7 +132,7 @@ import ImportGuideModal from './importGuideModal.vue'
|
|
|
import SettingCost from './settingCost.vue'
|
|
|
import { supplierProductList, supplierProductExportDetail, supplierProductUpdateAuditState, supplierProductNewBatchInsert } from '@/api/supplier'
|
|
|
export default {
|
|
|
- name: 'costSettingList',
|
|
|
+ name: 'CostSettingList',
|
|
|
mixins: [commonMixin],
|
|
|
components: { STable, VSelect, ProductBrand, ProductType, addProductModal, SettingCost, ImportGuideModal },
|
|
|
data () {
|
|
@@ -143,7 +150,7 @@ export default {
|
|
|
productBrandSn: undefined, // 产品品牌
|
|
|
productTypeSn1: '', // 产品一级分类
|
|
|
productTypeSn2: '', // 产品二级分类
|
|
|
- productTypeSn3: '' ,// 产品三级分类
|
|
|
+ productTypeSn3: '' // 产品三级分类
|
|
|
},
|
|
|
auditState: undefined
|
|
|
},
|
|
@@ -169,7 +176,8 @@ export default {
|
|
|
},
|
|
|
rowSelectionInfo: null,
|
|
|
newProduct: false,
|
|
|
- openSetModal: false
|
|
|
+ openSetModal: false,
|
|
|
+ editFlag: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -243,7 +251,7 @@ export default {
|
|
|
},
|
|
|
// 批量导入
|
|
|
handleBatchImport () {
|
|
|
- this.openGuideModal=true
|
|
|
+ this.openGuideModal = true
|
|
|
},
|
|
|
// 批量审核
|
|
|
handleBatchAudit () {
|
|
@@ -275,13 +283,13 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- auditOrder(sn,val){
|
|
|
+ auditOrder (sn, val) {
|
|
|
this.spinning = true
|
|
|
supplierProductUpdateAuditState({
|
|
|
auditState: val,
|
|
|
supplierProductSnList: sn
|
|
|
}).then(res => {
|
|
|
- if(res.status == 200){
|
|
|
+ if (res.status == 200) {
|
|
|
this.$refs.table.refresh(true)
|
|
|
this.$refs.table.clearSelected()
|
|
|
this.$message.info(res.message)
|
|
@@ -290,8 +298,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 成本设置
|
|
|
- handleCostSet (row) {
|
|
|
+ handleCostSet (row, flag) {
|
|
|
this.openSetModal = true
|
|
|
+ this.editFlag = !!flag
|
|
|
this.$refs.settingCost.setData(row)
|
|
|
},
|
|
|
pageInit () {
|