|
@@ -156,9 +156,7 @@
|
|
class="button-primary"
|
|
class="button-primary"
|
|
:loading="addLoading"
|
|
:loading="addLoading"
|
|
@click="handleAdd(record,0)"
|
|
@click="handleAdd(record,0)"
|
|
- v-if="record.purchasePrice>0"
|
|
|
|
id="purchaseOrderEdit-add-btn">添加</a-button>
|
|
id="purchaseOrderEdit-add-btn">添加</a-button>
|
|
- <span v-else>--</span>
|
|
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</div>
|
|
</div>
|
|
@@ -388,7 +386,7 @@ export default {
|
|
{ title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' },
|
|
{ title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
]
|
|
]
|
|
- // 产品来源
|
|
|
|
|
|
+ // 产品来源
|
|
if (this.isDealerUp) {
|
|
if (this.isDealerUp) {
|
|
arr.splice(1, 0, { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '15%', align: 'center', sorter: true })
|
|
arr.splice(1, 0, { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '15%', align: 'center', sorter: true })
|
|
arr.splice(6, 0, { title: '产品来源', dataIndex: 'sysFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
arr.splice(6, 0, { title: '产品来源', dataIndex: 'sysFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
@@ -505,11 +503,16 @@ export default {
|
|
}
|
|
}
|
|
// 添加
|
|
// 添加
|
|
if (type == 0) {
|
|
if (type == 0) {
|
|
- params.productSn = row.productSn
|
|
|
|
- params.purchaseBillSn = this.detail.purchaseBillSn
|
|
|
|
- params.purchaseBillNo = this.detail.purchaseBillNo
|
|
|
|
- params.price = row.purchasePrice
|
|
|
|
- params.qty = row.qty
|
|
|
|
|
|
+ if(row.purchasePrice&&row.terminalPrice&&row.carOwnersPrice){
|
|
|
|
+ params.productSn = row.productSn
|
|
|
|
+ params.purchaseBillSn = this.detail.purchaseBillSn
|
|
|
|
+ params.purchaseBillNo = this.detail.purchaseBillNo
|
|
|
|
+ params.price = row.purchasePrice
|
|
|
|
+ params.qty = row.qty
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.warning('成本价、终端会员价、终端会员价不能为空!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
} else { // 编辑
|
|
} else { // 编辑
|
|
// 清空成本价或数量时,值应保持未清空前的值,因成本价和数量都不可为空
|
|
// 清空成本价或数量时,值应保持未清空前的值,因成本价和数量都不可为空
|
|
if (!row.qty) {
|
|
if (!row.qty) {
|