|
@@ -29,7 +29,7 @@
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
- <a-form-model-item label="产品价格" prop="priceType" v-if="nowType=='dbPrint'">
|
|
|
|
|
|
+ <a-form-model-item label="产品价格" prop="priceType" v-if="nowType=='dbPrint'||nowType=='dbExport'">
|
|
<a-radio-group v-model="form.priceType">
|
|
<a-radio-group v-model="form.priceType">
|
|
<a-radio value="ALLOCATE_BILL_PRICE">销售价</a-radio>
|
|
<a-radio value="ALLOCATE_BILL_PRICE">销售价</a-radio>
|
|
<a-radio value="ALLOCATE_BILL_COST">成本价</a-radio>
|
|
<a-radio value="ALLOCATE_BILL_COST">成本价</a-radio>
|
|
@@ -40,20 +40,20 @@
|
|
<div class="btn-cont">
|
|
<div class="btn-cont">
|
|
<a-button id="allocateBill-print-close" @click="handleClose('preview')">取消</a-button>
|
|
<a-button id="allocateBill-print-close" @click="handleClose('preview')">取消</a-button>
|
|
<a-button
|
|
<a-button
|
|
- v-if="nowType!='dbflExport'"
|
|
|
|
|
|
+ v-if="nowType=='dbflPrint'||nowType=='dbPrint'"
|
|
id="allocateBill-print-save"
|
|
id="allocateBill-print-save"
|
|
type="primary"
|
|
type="primary"
|
|
class="button-info"
|
|
class="button-info"
|
|
@click="handleSave('preview')"
|
|
@click="handleSave('preview')"
|
|
style="margin-left: 15px;">打印预览</a-button>
|
|
style="margin-left: 15px;">打印预览</a-button>
|
|
<a-button
|
|
<a-button
|
|
- v-if="hidePrint&&nowType!='dbflExport'"
|
|
|
|
|
|
+ v-if="hidePrint&&(nowType=='dbflPrint'||nowType=='dbPrint')"
|
|
type="primary"
|
|
type="primary"
|
|
id="allocateBill-print-back"
|
|
id="allocateBill-print-back"
|
|
@click="handleSave('print')"
|
|
@click="handleSave('print')"
|
|
style="margin-left: 15px;">确定打印</a-button>
|
|
style="margin-left: 15px;">确定打印</a-button>
|
|
<a-button
|
|
<a-button
|
|
- v-if="nowType=='dbflExport'"
|
|
|
|
|
|
+ v-if="nowType=='dbflExport'||nowType=='dbExport'"
|
|
type="primary"
|
|
type="primary"
|
|
id="allocateBill-print-back"
|
|
id="allocateBill-print-back"
|
|
@click="handleSave('export')"
|
|
@click="handleSave('export')"
|
|
@@ -110,6 +110,8 @@ export default {
|
|
title = '调拨分类打印'
|
|
title = '调拨分类打印'
|
|
} else if (this.nowType == 'dbflExport') {
|
|
} else if (this.nowType == 'dbflExport') {
|
|
title = '调拨分类导出'
|
|
title = '调拨分类导出'
|
|
|
|
+ } else if (this.nowType == 'dbExport') {
|
|
|
|
+ title = '导出Excel'
|
|
}
|
|
}
|
|
return title
|
|
return title
|
|
},
|
|
},
|
|
@@ -123,39 +125,28 @@ export default {
|
|
const _this = this
|
|
const _this = this
|
|
this.$refs.ruleForm.validate(valid => {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- if (_this.nowType == 'dbflPrint') {
|
|
|
|
|
|
+ // 普通打印/导出
|
|
|
|
+ const obj = {
|
|
|
|
+ allocateSn: _this.itemData.allocateSn,
|
|
|
|
+ allocateNo: _this.itemData.allocateNo,
|
|
|
|
+ printType: _this.form.priceType,
|
|
|
|
+ isPreview: type == 'preview' ? 1 : 0
|
|
|
|
+ }
|
|
|
|
+ // 分类打印/导出
|
|
|
|
+ if (_this.nowType == 'dbflPrint' || _this.nowType == 'dbflExport') {
|
|
const item = _this.typeList.find(item => item.id == _this.form.id)
|
|
const item = _this.typeList.find(item => item.id == _this.form.id)
|
|
if (item) {
|
|
if (item) {
|
|
- const obj = {
|
|
|
|
- allocateSn: _this.itemData.allocateSn,
|
|
|
|
- allocateNo: _this.itemData.allocateNo,
|
|
|
|
- productBrandSn: item.productBrandSn,
|
|
|
|
- productTypeSn3: item.productTypeSn3,
|
|
|
|
- printType: 'ALLOCATE_BILL_TYPE',
|
|
|
|
- isPreview: type == 'preview' ? 1 : 0
|
|
|
|
- }
|
|
|
|
- _this.$emit('ok', obj)
|
|
|
|
- }
|
|
|
|
- } else if (_this.nowType == 'dbPrint') {
|
|
|
|
- const obj = {
|
|
|
|
- allocateSn: _this.itemData.allocateSn,
|
|
|
|
- allocateNo: _this.itemData.allocateNo,
|
|
|
|
- printType: _this.form.priceType,
|
|
|
|
- isPreview: type == 'preview' ? 1 : 0
|
|
|
|
|
|
+ obj.productBrandSn = item.productBrandSn
|
|
|
|
+ obj.productTypeSn3 = item.productTypeSn3
|
|
|
|
+ obj.printType = 'ALLOCATE_BILL_TYPE'
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+ // 打印
|
|
|
|
+ if (_this.nowType == 'dbPrint' || _this.nowType == 'dbflPrint') {
|
|
_this.$emit('ok', obj)
|
|
_this.$emit('ok', obj)
|
|
} else {
|
|
} else {
|
|
- const item = _this.typeList.find(item => item.id == _this.form.id)
|
|
|
|
- if (item) {
|
|
|
|
- const obj = {
|
|
|
|
- allocateSn: _this.itemData.allocateSn,
|
|
|
|
- allocateNo: _this.itemData.allocateNo,
|
|
|
|
- productBrandSn: item.productBrandSn,
|
|
|
|
- productTypeSn3: item.productTypeSn3,
|
|
|
|
- printType: 'ALLOCATE_BILL_TYPE'
|
|
|
|
- }
|
|
|
|
- _this.$emit('export', obj)
|
|
|
|
- }
|
|
|
|
|
|
+ // 导出
|
|
|
|
+ _this.$emit('export', obj)
|
|
}
|
|
}
|
|
_this.isShow = false
|
|
_this.isShow = false
|
|
} else {
|
|
} else {
|